How to Force Visual Studio to Use a Specific Version of DNX

笑着哭i 提交于 2019-12-07 07:29:01

问题


I was messing around with the dnvm, and I ran dnvm upgrade, putting me into beta5. However, the project I am working on is staying in beta4 (at least for now).

I have been attempting to revert and failing. I have gone as far as to delete the runtime folder. Now, when I open the project or attempt to make a new one I get the following error:

This is expected because I deleted the folder. However, I want to use dnx-clr-beta4. My dnvm list is as follows:

What do I need to do to make Visual Studio look for beta4 instead? Thank you for your time.


回答1:


Put the DNX version inside the global.json file which lives on the root directory of your solution (like here).

{
    "sdk": {
        "version": "1.0.0-beta4"
    }
}

You may need to restart the Visual Studio.

The other way is to configure this through project properties dialog inside Visual Studio:



来源:https://stackoverflow.com/questions/30309356/how-to-force-visual-studio-to-use-a-specific-version-of-dnx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!