System.IO.Packaging

前端 未结 8 1517
感情败类
感情败类 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:47

    System.IO.Packaging is a namespace, not a reference. Most (all?) of the classes within the namespace, such as ZipPackage, are deployed in WindowsBase.dll.

    Make sure you have a reference to WindowsBase.dll - if you do, you can just add: using System.IO.Packaging; to your .cs files, and you'll be fine.

    Note that you can see this in the documentation for any class on MSDN. For example, in ZipPackage, it lists:

    Namespace:  System.IO.Packaging
    Assembly:  WindowsBase (in WindowsBase.dll)
    

提交回复
热议问题