如何强制Visual Studio使用特定版本的DNX [英] How to Force Visual Studio to Use a Specific Version of DNX

查看:119
本文介绍了如何强制Visual Studio使用特定版本的DNX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在搞弄dnvm,我进行了dnvm升级,使我进入beta5.但是,我正在研究的项目仍停留在beta4中(至少现在是这样).

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:

这是预期的,因为我删除了该文件夹.但是,我想使用dnx-clr-beta4.我的dnvm列表如下:

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

我需要做什么才能使Visual Studio代替beta4?谢谢您的时间.

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

推荐答案

将DNX版本放入位于解决方案根目录中的global.json文件中(例如

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"
    }
}

您可能需要重新启动Visual Studio.

You may need to restart the Visual Studio.

另一种方法是通过Visual Studio中的项目属性对话框进行配置:

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

这篇关于如何强制Visual Studio使用特定版本的DNX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆