我今天早上升级到VS2015 RC,并使用ASP.NET 5模板-网站创建了一个新项目。我有一个无法解决的错误:
这是完整的错误堆栈:
我的project.json文件与模板中提供的文件相同:
{
"webroot": "wwwroot",
"userSecretsId": "aspnet5-WebApplication2-2819f43f-7688-4637-89a0-d22341b36a64",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework.SqlServer": "7.0.0-beta4",
"EntityFramework.Commands": "7.0.0-beta4",
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4",
"Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4",
"Microsoft.Framework.Logging": "1.0.0-beta4",
"Microsoft.Framework.Logging.Console": "1.0.0-beta4",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000",
"gen": "Microsoft.Framework.CodeGeneration",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install", "bower install" ],
"prepare": [ "gulp copy" ]
}
}
当我运行dnvm list命令时:
> dnvm list
Active Version Runtime Architecture Location Alias
------ ------- ------- ------------ -------- -----
1.0.0-beta4 clr x64 <mypath>\.dnx\packages
1.0.0-beta4 clr x86 <mypath>\.dnx\packages
1.0.0-beta4 coreclr x64 <mypath>\.dnx\packages
1.0.0-beta4 coreclr x86 <mypath>\.dnx\packages
1.0.0-beta5-11596 clr x86 <mypath>\.dnx\packages
* 1.0.0-beta5-11624 clr x86 <mypath>\.dnx\packages default
我也尝试使用1.0.0-beta5-11596和1.0.0-beta4 clr,但得到的结果相同。
任何想法?
谢谢。
最佳答案
我认为David是对的,我遇到了同样的问题,并且能够通过以下方式解决此问题:
完成此操作后,我打开了备份项目,软件包成功还原,并且能够运行该应用程序。无论出于何种原因,defaults.txt均出于任何原因都指向beta5运行时,假设在使用命令行工具时已将其设置为某个时间。
希望对您也有用!