c# – .net 4.0版本中找不到System.Web程序集

我将.NET从3.5版本升级到4.0版本,但是在更新程序集System.Web不再工作之后.

我收到以下错误

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版本它可以正常工作.如何解决这个问题?

解决方法

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

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.

Differences between Microsoft .NET 4.0 full Framework and Client Profile

相关文章

在项目中使用SharpZipLib压缩文件夹的时候,遇到如果目录较深,则压缩包中的文件夹同样比较深的问题。比...
项目需要,几十万张照片需要计算出每个照片的特征值(调用C++编写的DLL)。 业务流程:选择照片...
var array = new byte[4]; var i = Encoding.UTF8.GetBytes(100.ToString("x2"));//...
其实很简单,因为Combox的Item是一个K/V的object,那么就可以把它的items转换成IEnumerable<Dic...
把.net4.6安装包打包进安装程序。 关键脚本如下: 头部引用字符串对比库 !include "WordFunc....
项目需求(Winform)可以批量打印某个模板,经过百度和摸索,使用iTextSharp+ZXing.NetʿreeSp...