EPPlus缺少依赖性 [英] EPPlus missing dependency

查看:246
本文介绍了EPPlus缺少依赖性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目中添加了EPPlus和OfficeOpenXml的用法。
但是,当我运行项目时,出现此错误和警告:

I added EPPlus and usage of OfficeOpenXml to my project. However, when I run my project I get this errors and 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.

错误:

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?

推荐答案

问题如警告所示,是EPPlus引用了程序集( System.Web )不在.NET v4.0客户端框架中。您可能要针对完整的.NET v4.0,而不是客户端框架。

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.

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

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.

这篇关于EPPlus缺少依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆