如何在Visual Studio 2015中修复DNX / DNVM?

奥米奇:

今天,我在Windows 7 x64上安装了VS 2015。主要用于测试新的.Net Core功能等。为了进行测试,我创建了新的C#“控制台应用程序(程序包)”解决方案,并收到以下消息:

DNX SDK版本“ dnx-clr-win-x86.1.0.0-beta5”安装失败。该解决方案将为此会话使用DNX SDK版本“ dnx-clr-win-x86.1.0.0-beta5”。

我无法编译和调试项目。另外,当我在项目属性中打开调试选项卡时,VS崩溃了。

打开解决方案时的DNVM输出:

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

任何想法如何解决?

另外,我之前已经分别安装了VS 2015 Preview和DNX / DNVM。但是我认为,在VS 2015安装之前,我已将其完全删除。这会以某种方式影响当前的VS安装吗?

文森特:

这是一个已知问题

ASP.NET 5:在Windows 7 SP1上,如果没有Powershell 3.0,则无法安装DNX SDK。

病征

当您创建一个ASP.NET 5项目时,您会收到以下错误消息:

DNX SDK版本“ dnx-clr-win-x86.1.0.0-beta5”安装失败。该解决方案将为此会话使用DNX SDK版本'dnx-clr-win-x86-1.0.0-beta5'

解决方法

要变通解决此问题,请安装Windows Powershell 3.0(或更高版本),然后尝试再次创建项目。要查看您当前的PS版本,请运行$PsVersionTable命令(details)。

链接:

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章