System.IO.Packaging

前端 未结 8 1513
感情败类
感情败类 2020-12-24 00:15

I have my project set to .NET Framework 4.0. When I add System.IO.Packaging, it says that it doesn\'t exist. It also doesn\'t show up when I try to add it as a

8条回答
  •  旧巷少年郎
    2020-12-24 00:46

    For a C# solution in Visual Studio 2010 with .NET 4.0:

    1. In your project's Solution Explorer, right-click on References and select Add References from the context menu.
    2. Select Assemblies in the left-hand pane, then click the Browse button next to the File name field near the botton of the pane.
    3. Browse to .NET 4.0 reference assemblies and select WindowsBase.dll. For example, on my machine (Windows 7, 64-bit) the complete path is:

    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\WindowsBase.dll

    Save the solution (especially if you're compiling from the command-line with MSBuild) and you should now be able to add the using System.IO.Packaging directive to the top of your .cs file without an error appearing.

提交回复
热议问题