DNX:当前运行时目标框架与项目不兼容
DNX: The current runtime target framework is not compatible with project
我收到以下 运行 时间错误:
[InvalidOperationException: The current runtime target framework is not compatible with 'TestDeployProject'.
Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)'
Type: CLR
Architecture: x86
Version: 1.0.0-beta6-12256
Please make sure the runtime matches a framework specified in project.json]
项目设置DNX SDK版本:
project.json
目标框架:
"frameworks": {
"dnx46": { }
},
DNVM 列表:
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-beta6 clr x64 win
* 1.0.0-beta6 clr x86 win latest
1.0.0-beta6 coreclr x64 win default
可能是什么问题?
编辑:
我已尝试使用 中指定的 dnx451。同样的问题。环境变量也没有帮助。
查看 project.json
中的 dependencies
部分。如果您的 ASP.NET 包不在 beta6
.
,您将收到此错误
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
"Microsoft.AspNet.Mvc.Core": "6.0.0-beta6",
"Microsoft.AspNet.Cors": "1.0.0-beta6",
"Microsoft.Framework.Configuration": "1.0.0-beta6",
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
...
昨天我将两个项目从 beta4 升级到了 beta6。不小心留下了 beta4 的依赖项,但是 global.json
sdk 设置为 beta6,当 运行 它时我得到了这个确切的错误。
我收到以下 运行 时间错误:
[InvalidOperationException: The current runtime target framework is not compatible with 'TestDeployProject'.
Current runtime Target Framework: 'DNX,Version=v4.5 (dnx45)'
Type: CLR
Architecture: x86
Version: 1.0.0-beta6-12256
Please make sure the runtime matches a framework specified in project.json]
项目设置DNX SDK版本:
project.json
目标框架:
"frameworks": {
"dnx46": { }
},
DNVM 列表:
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-beta6 clr x64 win
* 1.0.0-beta6 clr x86 win latest
1.0.0-beta6 coreclr x64 win default
可能是什么问题?
编辑:
我已尝试使用
查看 project.json
中的 dependencies
部分。如果您的 ASP.NET 包不在 beta6
.
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
"Microsoft.AspNet.Mvc.Core": "6.0.0-beta6",
"Microsoft.AspNet.Cors": "1.0.0-beta6",
"Microsoft.Framework.Configuration": "1.0.0-beta6",
"Microsoft.Framework.Configuration.Json": "1.0.0-*",
...
昨天我将两个项目从 beta4 升级到了 beta6。不小心留下了 beta4 的依赖项,但是 global.json
sdk 设置为 beta6,当 运行 它时我得到了这个确切的错误。