Whay是mt使用灰色的系统名称空间 [英] Whay are mt Using system namespaces greyed out
问题描述
我正在尝试在ASP.NET MVC 4中构建应用程序,而至于我的c#代码中,我一半的名称空间都是灰色的.
I'm trying to build in app in ASP.NET MVC 4 and as far as my c# code half of my name spaces are greyed out.
这些很好:
使用系统
使用System.Linq
using System.Linq
这些不好:
使用System.Collections.Generic
using System.Collections.Generic
使用System.Web
using System.Web
使用System.Web.MVC
using System.Web.MVC
使用System.Web.Http.Data.EntityFramework
using System.Web.Http.Data.EntityFramework
为什么会这样,我该如何解决?
Why is this happening and how do I fix this?
与我使用的.Net版本有什么关系吗?
Does it have anything to do with which version of .Net I'm using?
请帮助!!!
推荐答案
您要定位哪个框架?
Which framework are you targeting?
猜测...在解决方案资源管理器中右键单击[项目名称]->属性->应用-> 目标框架",这很可能设置为.NET Frameowrk X客户端配置文件,而应该仅设置为.NET Framework X.
At a guess... go to right click on [project name] in solution explorer -> properties -> Application -> 'target framework' and this is likely set to .NET Frameowrk X client profile whereas it should be set to just .NET Framework X.
这篇关于Whay是mt使用灰色的系统名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!