今日、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 インストールに何らかの影響を与える可能性がありますか?
ベストアンサー1
これは既知の問題。
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
(詳細)。
リンク: