The type \'Package\' is defined in an assembly that is not referenced

Home Forums Open-Xml-PowerTools The type \'Package\' is defined in an assembly that is not referenced

This topic contains 1 reply, has 2 voices, and was last updated by  Eric White 8 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3861

    andrewvr1
    Participant

    I am very rusty on the programming side, so apologies if I have missed something simple. I am trying to compile the SDK Tools and am getting the error “The type ‘Package’ is defined in an assembly that is not referenced”.

    When I first tried it I got errors about System.IO.Packaging but (after some bumbling) I eventually managed to compile that from the Open-XML-SDK project and added it as a reference to my Open-Xml-PowerTools project. That got rid of the System.IO.Packaging error, but replaced it with this one. I can add a reference to WindowsBase but I will be using this code in SharePoint so am reluctant to do that.

    A search for this error turns up nothing, which is why I think I may be missing something simple, but any help you can give me would be appreciated.

    (By the way, this is truly a fantastic toolset you have built here, so impressed with it)

    #3873

    Eric White
    Keymaster

    Hi,

    When you are using this code in SharePoint, you will need to use WindowsBase. This is the correct approach. Lots of other SharePoint code uses WindowsBase.

    I am super-happy that you like Open-Xml-PowerTools. 🙂

    Cheers, Eric

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.