5

こんにちは、EPPlus を使用して c# 2.0 で Excel を作成しています。「EPPlus.dll」の参照を追加し、さらに追加しました

using OfficeOpenXML;

しかし、ソリューションを実行しようとすると、次のエラーが発生します。

エラー:

The type or namespace name 'OfficeOpenXml' could not be found (are you missing a using directive or an assembly reference?)

警告 1:

The primary reference "EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL" or retarget your application to a framework version which contains "WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".

警告 2:

The primary reference "EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "EPPlus, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

前もって感謝します..

4

5 に答える 5

8

これで問題は解決しました:

EPPlus のエラー

プロジェクトのターゲットを「.Net 4.0 Client Profile」から「.Net 4.0」に変更するだけです

于 2013-10-27T22:09:47.113 に答える