EPPlus上的错误

Mor*_*log 7 c# epplus

我在项目中添加了EPPlus和OfficeOpenXml的使用.但是,当我运行我的项目时,我收到此错误并发出警告:

警告 :

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.
Run Code Online (Sandbox Code Playgroud)

错误:

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?)
Run Code Online (Sandbox Code Playgroud)

有人可以帮我搞清楚吗?

Tim*_* S. 12

问题就像警告所说的那样,EPPlus引用了一个System.Web不在.NET v4.0客户端框架中的程序集().您可能希望以完整的.NET v4.0而不是Client框架为目标.

更新这有关于更改项目的目标框架的分步说明:http://msdn.microsoft.com/en-us/library/vstudio/bb398202.aspx在您的项目中尝试引用EPPlus,而不是在.NET 4.0 Client Profile中,选择.NET 4.0.