2011-10-08 18 views
10

Ho aggiornato .NET dalla versione 3.5 alla versione 4.0, ma dopo aver aggiornato l'assieme System.Web non funziona più.L'assembly System.Web non è stato trovato nella .net versione 4.0

sto ottenendo il seguente errore:

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.

Utilizzando la versione 3.5 funziona benissimo. Come posso risolvere questo?

+1

Indirizza la versione completa, non la versione client. –

risposta

17

Modificare il progetto dal ClientProfile alla piena .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.

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

15

Penso che sia stato selezionato .NET 4.0 Client profile per il framework di destinazione. Basta passare a .Net 4.0

enter image description here

5

Stai targeting il profilo client .NET 4.0, che è un .net "lite" per gli utenti desktop. Passa alla versione completa di .NET 4.0 per arrivare a System.Web

Proprietà progetto - scheda> Applicazioni -> Target Framework

4

Provare a modificare "Target Framework" come ".NET Framework 4" anziché "Profilo client .NET Framework 4".

Problemi correlati