2013-06-03 9 views
7

Ho aggiunto EPPlus e l'utilizzo di OfficeOpenXml nel mio progetto. Tuttavia, quando ho eseguito il mio progetto ho questa errori e di allarme:Errori su EPPlus

Attenzione:

The referenced assembly "EPPlus" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which 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. 

Errori:

The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?) 
The type or namespace name 'ExcelPackage' could not be found (are you missing a using directive or an assembly reference?) 

qualcuno può aiutarmi a capirlo?

risposta

12

Il problema, come dice l'avvertenza, è che EPPlus fa riferimento a un assembly (System.Web) che non si trova in .NET Framework Client v4.0. Potresti voler scegliere come target .NET completo v4.0 invece del framework Client.

Aggiornamento Questo è passo-passo le istruzioni su come cambiare il framework di destinazione per un progetto: http://msdn.microsoft.com/en-us/library/vstudio/bb398202.aspx Nel progetto che sta cercando di fare riferimento EPPlus, invece di .NET 4.0 Client Profile, scegliete NET 4.0.

+0

per favore dammi una soluzione – Morilog

+0

Aggiornato la soluzione. Fammi sapere se questo aiuta. –