【发布时间】:2015-11-11 14:11:11
【问题描述】:
我在运行 MVC6 应用程序时遇到问题。 项目构建良好,没有错误,包正确加载(恢复没有错误)
Here is my global.json code. As you see, both dnx versions in app and on machine are the same
当然,我正在使用带有 WebTools-beta8 和 DotNetVersionManager-beta8 的 VS2015。
这是我的 project.json 的一部分:
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel",
"gen": "Microsoft.Extensions.CodeGeneration"
},
"frameworks": {
"dnx451": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components",
"Content"
],
"publishExclude": [
"Content",
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install", "bower install" ],
"prepare": [ "gulp copy" ]
}
当我点击“Web”命令时,项目构建,但随后 cmd 窗口显示下一条消息:('Could not load file or assembly Microsoft.Extensions.PlatformAbstract')
输出/调试窗口以 “程序 '[14200] dnx.exe' 已退出,代码为 1 (0x1)。”
我更新了 dnvm 和 webTools,但问题没有解决。顺便说一句,在另一台 PC 上,项目运行良好,所以可能是我的 dnx 的问题。
【问题讨论】:
-
难道你没有机会使用 beta8 运行时运行带有 rc1 包的项目吗?
-
你确定你在“依赖”部分有所有需要的包吗?请出示。
-
在 net451 框架上引用项目时,我有同样的行为。
-
尝试从
%UserProfile/.dnx/packages删除所有下载的nuget包,然后再次执行dnu restore。
标签: .net asp.net-core dnx