2013-06-03 18 views
7

EPPlusとOfficeOpenXmlの使用方法をプロジェクトに追加しました。私は私のプロジェクトを実行すると はしかし、私はこのエラーと警告を受ける:EPPlusでのエラー

警告:

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

誰かが私はそれを把握助けることができますか?

答えて

12

EPPlusが.NET v4.0クライアントフレームワークに含まれていないアセンブリ(System.Web)を参照しているという問題があります。 Clientフレームワークではなく、.NET v4.0全体を対象とすることができます。

更新これは、プロジェクトのターゲットフレームワークを変更する手順があります。EPPlusを参照しようとしているプロジェクトでhttp://msdn.microsoft.com/en-us/library/vstudio/bb398202.aspx、代わりに.NET 4.0クライアント・プロファイルのを、.NET 4.0を選択してください。

+0

私に解決策を教えてください – Morilog

+0

ソリューションを更新しました。それが役に立ったら教えてください。 –

関連する問題