【发布时间】:2015-09-08 15:05:58
【问题描述】:
这个问题是关于一个过时的测试版,可能会被删除
安装 DNX beta7 和 ASP.NET Visual Studio Tools for Beta 7 后,在 Visual Studio 2015 中打开一个基于“ASP.NET 5 预览模板”(现在称为 ASP.NET Core)的小应用程序,提供以下信息错误:
---------------------------
Microsoft Visual Studio
---------------------------
Cannot find DNX SDK version 'dnx-clr-win-x86.1.0.0-beta6-12256' required by
your solution. Do you want to install it now? If you select No,
‘dnx-clr-win-x86.1.0.0-beta7’ will be used as the solution DNX SDK version
for this session.
---------------------------
Yes No
---------------------------
选择 Yes 会导致以下消息框和 DNVM 输出窗格中的以下错误输出:
---------------------------
Microsoft Visual Studio
---------------------------
DNX SDK version 'dnx-clr-win-x86.1.0.0-beta6-12256' failed to install.
The solution will use DNX SDK version ‘dnx-clr-win-x86.1.0.0-beta7’ for
this session.
---------------------------
OK
---------------------------
DNVM 输出面板:
There are no runtimes matching the name dnx-clr-win-x86 on feed
https://www.nuget.org/api/v2.
At C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:563 char:9
+ throw "There are no runtimes matching the name $RuntimeId on ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (There are no ru...get.org/api
/v2.:String) [], RuntimeException
+ FullyQualifiedErrorId : There are no runtimes matching the name dnx-clr-
win-x86 on feed https://www.nuget.org/api/v2.
There are no runtimes matching the name dnx-clr-win-x86 on feed
https://www.myget.org/F/aspnetvnext/api/v2.
At C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:563 char:9
+ throw "There are no runtimes matching the name $RuntimeId on ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (There are no ru...etvnext/api
/v2.:String) [], RuntimeException
+ FullyQualifiedErrorId : There are no runtimes matching the name dnx-clr-
win-x86 on feed https://www.myget.org/F/aspnetvnext/api/v2.
有趣的是,当我从我的 powershell 运行 dnvm 命令列出 DNX 运行时时,它列出了 1.0.0-beta5、beta6、beta7 已安装并存在于我的 c:\Users\USERNAME\.dnx\runtimes 文件夹中。
发生了什么以及如何解决这个问题?
【问题讨论】:
-
我建议创建一个新项目并将更改与您以前的项目进行比较以更新以前的项目。更新 project.json 文件,如果 wwwroot 文件夹中存在 global.json、web.config,可能还需要更新以引用 beta7。另请注意,最新项目会将 Nuget.config 文件放在引用 api.nuget.org/v3/index.json 的解决方案项中,因此您可能还需要添加它。
-
你的项目有
global.json吗? -
有一个 project.json 似乎需要更新,但 global.json 似乎已经设置为等于项目设置对话框中的任何内容。
-
你能发布你的project.json吗?
-
我认为实际的问题是您不能仅使用 IDE 获取 .xproj 并就地更新它。你必须放弃你的 beta6 解决方案和 .xproj 和 project.json 和 global.json 以及一般的整体结构,生成一个 NEW 项目,并添加你自己的源,beta7 需要这个。
标签: visual-studio-2015 asp.net-core dnx