EPPlus missing dependency

大城市里の小女人 提交于 2019-12-22 04:42:24

问题


I added EPPlus and usage of OfficeOpenXml to my project. However, when I run my project I get this errors and warning :

Warning :

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.

Errors :

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?)

Can someone help me figure it out?


回答1:


The problem, like the warning says, is that EPPlus references an assembly (System.Web) that is not in the .NET v4.0 Client Framework. You might want to target the full .NET v4.0 instead of the Client framework.

Update This has step-by-step instructions on changing the target framework for a project: http://msdn.microsoft.com/en-us/library/vstudio/bb398202.aspx In your project that's trying to reference EPPlus, instead of .NET 4.0 Client Profile, choose .NET 4.0.



来源:https://stackoverflow.com/questions/16907629/epplus-missing-dependency

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!