问题
I cloned a repository based on ASP.NET 5 Mvc 6 Beta 8. Visual Studio could not install the latest DNX SDK.
This is the error message: "DNX SDK version 'dnx-clr-win-x86.1.0.0-beta8-15530' failed to install. The solution will use DNX SDK version 'dnx-clr-win-x86.1.0.0-beta7' for this session.
I tried to run dnvm upgrade but it said I already have the latest version.
This is the repository: https://github.com/Kukkimonsuta/Odachi/tree/master/src/Odachi.Security.BasicAuthentication (It is a sample for Middleware implementing basic authentication).
Is it possible that this code uses some beta build which is not yet available for the dnvm?
Update
C:\Windows\system32>dnvm upgrade -u
Determining latest version
Downloading dnx-clr-win-x86.1.0.0-rc1-15798 from https://www.myget.org/F/aspnetvnext/api/v2
Installing to C:\Users\mjost\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-15798
Adding C:\Users\mjost\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-15798\bin to process PATH
Adding C:\Users\mjost\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-15798\bin to user PATH
Updating alias 'default' to 'dnx-clr-win-x86.1.0.0-rc1-15798'
Does not seem to do what is expected. I got the same error message when I open the solution after executing dnvm upgrade -u
It still does not compile. How to install that exact dnx needed?
Update I updated to the stable beta 8 and still got errors. I posted an issue in the original Github repository: https://github.com/Kukkimonsuta/Odachi/issues/4
回答1:
DNVM uses aspnetdev
as unstable feed which contains RC1 builds now and the stable NuGet feed contains beta7 builds. You can set the feed to aspnetrelease
temporarily and then run the upgrade:
SET DNX_FEED=https://www.myget.org/F/aspnetrelease/
dnvm upgrade
This will install v1.0.0-beta8-15794
.
Update: another option would be to remove the version
(and the sdk
) element of the global.json. With this option you force .NET to build your app against the specified runtime, which you don't want. If you don't specify it, it will build against the current active runtime.
回答2:
If you want to use beta8 bits then you have to run dnvm upgrade -u
(-u means unstable; aka dev feed)
来源:https://stackoverflow.com/questions/32944313/dnx-sdk-version-dnx-clr-win-x86-1-0-0-beta8-15530-failed-to-install