c# - 在 .net 4.0 版本上找不到 System.Web 程序集

标签 c# .net c#-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

关于c# - 在 .net 4.0 版本上找不到 System.Web 程序集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7694380/

相关文章:

C# - 在某个位置后截断

c# - TPL 数据流 BufferBlock<> 消费者在 WPF 的主线程中工作

.net - app.config <supportedRuntime>

c# - 如何使用任务并行库执行多个任务并在第一个任务实际返回数据后返回

c# - DropDownCheckBoxes 不响应 ASP.NET 中的 Bootstrap 类

c# - 将 Deedle Frame 绑定(bind)到 DataGridView

c# - 使用 Ninject 跨类传递参数

.net - 多个线程加载附加到从数据库检索的不同集合的不同网格

c# - AutoResetEvent 在信号前触发

c# - 尝试将十进制数解析为 Int 时 TryParse 不起作用