简体   繁体   English

尚未解决Visual Studio 2010“ System.Web”参考[C#]

[英]Visual Studio 2010 “System.Web” reference unresolved [C#]

I'm having trouble with adding a reference to my project. 我在添加对我的项目的引用时遇到麻烦。 I need the System.Web reference in order for my code to work but the reference won't stick. 我需要System.Web引用才能使我的代码正常工作,但该引用不会停留。 When I look in the Solution Explorer, I found this alert icon on top of the reference I added. 当我在解决方案资源管理器中查看时,我在添加的参考之上找到了该警报图标。 I have the same reference in another project within the same solution and it is working fine. 我在相同解决方案的另一个项目中拥有相同的参考,并且工作正常。

带有警告图标的参考

If you look at the properties of this reference, you'll see that the Resolved attribute is set to False 如果查看此引用的属性,则会看到Resolved属性设置为False

该参考的属性

Does anyone know how I can fix this or what's causing this problem? 有谁知道我该如何解决此问题或导致此问题的原因?

Good chance that your project is targetting .NET Framework 4.0 Client Profile . 您的项目很有可能瞄准.NET Framework 4.0 Client Profile System.Web is not supported by the client profile. 客户端配置文件不支持System.Web。 Change it to .NET Framework 4.0 . 将其更改为.NET Framework 4.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM