简体   繁体   English

DNX:当前的运行时目标框架与项目不兼容

[英]DNX: The current runtime target framework is not compatible with project

I am getting the following run-time error: 我收到以下运行时错误:

[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]

Project settings DNX SDK version: 项目设置DNX SDK版本:

解决方案DNX SDK版本

project.json target frameworks: project.json目标框架:

"frameworks": {
  "dnx46": { }
},

DNVM list : 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

What could be the problem? 可能是什么问题呢?

EDIT: 编辑:

I have tried to use dnx451 as specified in this post . 我曾尝试在指定使用dnx451 这个职位 Same problem. 同样的问题。 The environmental variable also did not help. 环境变量也没有帮助。

Look at the dependencies section in your project.json . 查看project.json中的dependencies部分。 You will get this error if your ASP.NET packages are not at beta6 . 如果您的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-*", ...

Yesterday I upgraded two projects from beta4 to beta6. 昨天我将两个项目从beta4升级到beta6。 Accidentally left the dependencies of one at beta4, but with global.json sdk set to beta6, and I got this exact error when running it. 意外地将global.json的依赖关系留在global.json ,但是将global.json sdk设置为global.json ,运行时我得到了这个确切的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM