如何切换上下文VS.NET 2015年? [英] How to switch context in VS.NET 2015?

查看:197
本文介绍了如何切换上下文VS.NET 2015年?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到编译错误,因为有些课我用了DNX 4.5.1,而不是DNX核心5.0可用。

I'm getting build errors because some classes I'm using are available in "DNX 4.5.1" and not "DNX Core 5.0".

该错误是:

类型或命名空间[SomeClass的]'找不到。

The type or namespace '[someclass]' could not be found.

在错误列表窗口的项目中,我看到DNX核心5.0。

In the project column of the "Error List" window, I see DNX Core 5.0.

在上下文菜单中,DNX 4.5.1被选中。为什么VS.NET尝试使用,以保持DNX核心5.0时的背景是4.5.1?

In the context menu, DNX 4.5.1 is selected. Why does VS.NET try to keep using DNX Core 5.0 when the context is 4.5.1?

推荐答案

在情况下,有些人是通过从project.json文件的框架引用删除其与此仍在挣扎,你可以取消引用DNX核心5.0。

In case some people are still struggling with this, you can dereference the DNX Core 5.0 by removing it from your framework references in the project.json file.

本节

  "frameworks": {
    "dnx451": { },
    "dnxcore50": { }
  },

应该成为

  "frameworks": {
    "dnx451": { }
  },

这篇关于如何切换上下文VS.NET 2015年?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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