2011-10-08 37 views
10

Tôi cập nhật .NET từ 3.5 thành 4.0 phiên bản, nhưng sau khi cập nhật assembly System.Web không hoạt động nữa.System.Web không được tìm thấy trên .net 4.0 phiên bản

Tôi nhận được lỗi sau:

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.

Sử dụng phiên bản 3.5 nó hoạt động tốt. Làm thế nào tôi có thể sửa lỗi này?

+1

Nhắm mục tiêu phiên bản đầy đủ, không phải phiên bản ứng dụng khách. –

Trả lời

17

Thay đổi dự án từ ClientProfile đầy đủ 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.

Xem Differences between Microsoft .NET 4.0 full Framework and Client Profile

15

Tôi nghĩ bạn đã chọn .NET 4.0 Client profile cho khung mục tiêu. Chỉ cần chuyển sang .Net 4.0

enter image description here

5

Bạn đang nhắm mục tiêu các Client Profile .net 4.0, mà là một .net "lite" cho người dùng máy tính để bàn. Đổi thành đầy đủ .net 4.0 để có được tại System.Web

Project Properties - tab> Ứng dụng -> Target Framework

4

Thử thay đổi "Target Framework" thành ".NET Framework 4" thay vì ".NET Framework 4 Client Profile".

Các vấn đề liên quan