System.Web程序集是不是在.NET 4.0中程序、Web、System、NET

2023-09-04 22:55:27 作者:回到原点却回不到原来

我更新.NET从 3.5 4.0 的版本,但更新后装配的System.Web 不起作用了。

I updated .NET from 3.5 to 4.0 version, but after updating the assembly System.Web doesn't work any more.

我收到以下错误:

警告1无法解析组件的System.Web。该组件是不是在当前目标框架.NETFramework,版本= V4.0,外形=客户。请删除对程序集不是在目标的框架或考虑重新目标项目。

Warning 1 Could not resolve assembly "System.Web". The assembly is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.

使用 3.5 版本,它工作正常。我该如何解决这个问题?

Using the 3.5 version it works fine. How can I fix this?

推荐答案

从ClientProfile更改项目完整的.NET 4.0

Change the project from ClientProfile to full .NET 4.0

.NET Framework 4的客户端配置文件是.NET Framework的一个子集   4是用于客户端应用进行了优化。它提供的功能   对于大多数客户端应用程序,包括Windows presentation   基金会(WPF),Windows窗体,Windows通信基础   (WCF),和ClickOnce的特征。这使得更快的部署和   对于较小针对.NET应用程序安装包   Framework 4的客户端配置文件。

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.

请参阅Difference .NET4客户端配置文件和完整的框架下载之间