How to fix DNX/DNVM in Visual Studio 2015?

后端 未结 8 869
时光取名叫无心
时光取名叫无心 2020-12-01 06:02

Today I installed VS 2015 on Windows 7 x64. Mainly to test new .Net Core features and etc. And for test I created new C# \"Console Application (Package)\" solution and got t

8条回答
  •  情深已故
    2020-12-01 06:44

    I had a similar problem earlier today, and the way in which I managed to solve it after reading the comments in this page was very straight forward.

    First of all I have to say that I already had PowerShell 3.0 installed (not having it installed seems to be the main source of this problem for most people) and yet I still was having this same issue.

    So instead of having to edit and modifying the powershell scripts involved in order to make them work with paths with whitespaces, etc as suggested, I just simply did as follows (much simpler):

    1.- Go to "C:\Program Files (x86)\Microsoft Web Tools\DNX" in Windows explorer and "copy" all its content (basically all the packages and their sub-folders)

    2.- "Paste" all that content into a path with no blank spaces. I used "C:\Temp\"

    3.- Run the following commands on the command line (notice there are no blank spaces now in the path locations indicated)

    dnvm update-self
    dnvm install "C:\Temp\dnx-clr-win-x64.1.0.0-beta5.nupkg"
    dnvm install "C:\Temp\dnx-coreclr-win-x64.1.0.0-beta5.nupkg"
    dnvm list
    

    4.- Open your Visual Studio solution now and on your Project -> Properties -> Application tab, in there you can now specify the version of the DNX SDK that you want to use from those of which you have now available

    5.- Re-build your solution and it should now be all fine

    Nice one!

提交回复
热议问题