EPPlus missing addiction

I added EPPlus and using OfficeOpenXml to my project. However, when I run my project, I get these errors and warnings:

A 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 this out?

+7
source share
1 answer

The problem, like the warning, is that EPPlus is referencing an assembly ( System.Web ) that is not in the .NET v4.0 Client Framework. You can target all .NET v4.0 instead of the client infrastructure.

Update . Step-by-step instructions for changing the target structure for the project: http://msdn.microsoft.com/en-us/library/vstudio/bb398202.aspx In your project that tries to reference EPPlus instead of the .NET Client Client, select .NET 4.0.

+12
source

All Articles