none
Get DocumentFormat.OpenXml.dll (2.0.5022.0) to work on x86/32-bit server RRS feed

  • Question

  • Hello,

    We have deployed the current version of the OpenXml SDK 2.0 dll (DocumentFormat.OpenXml.dll version 2.0.5022.0) into the GAC of a 64-bit server (Win Svr 2008) for use in a SharePoint 2007 environment.

    However, we are developing this SharePoint 2007 site in Designer, not Visual Studio (don't ask, we are in a restricted environment, cannot use VS, etc.) - the problem is we cannot register and reference the OpenXml assembly, we think because the GAC is 64-bit, but the dll version is 32 bit.

    Is the OpenXml SDK 2, version 2.0.5022.0, 64-bit or 32-bit?  Is there any other way to reference the dll successfully in ASPX Code Behind pages without being able to use the normal GAC assembly reference?

    Thanks.

    Wednesday, February 16, 2011 5:22 PM

Answers

  • Hello sdfsda,

    In response to your first question - i.e. Is the OpenXml SDK 2, version 2.0.5022.0, 64-bit or 32-bit?

    It's 32-bit

    Answer to your second question -  Is there any other way to reference the dll successfully in ASPX Code Behind pages without being able to use the normal GAC assembly reference

    You can also call it by putting the assembly in the /bin folder. If you want your CodeBehind to reference an
    assembly you would change it in the page directives, and place the assembly in the bin or GAC. There is a good discussion of this in the Forum site titled - "Application pages with code behind - without getting dll into GAC"
    http://social.msdn.microsoft.com/forums/en-us/sharepointdevelopment/thread/F83EF410-8F12-4139-BBD9-FD7A364E001D

    • Marked as answer by sdfsda Thursday, February 17, 2011 6:07 PM
    Thursday, February 17, 2011 4:05 PM
    Moderator
  • Okay, so here's our setup:

    We are using SP Designer to build out the SharePoint site (don't ask, we can't use VS, we are in a very restricted environment, etc.).  The live production server runs SP 2007 on a Windows 2008 R2 64-bit platform.  We had trouble figuring out the exact combo of steps to be able to reference the DocumentFormat.OpenXml dll.  With other dlls, usually all we had to do was place them in the GAC and then register them on the .aspx page we were using them on (with inline code, of course....again, this is crappy but this is what we have to put up with).  For some reason this did not work with the DocumentFormat.OpenXml.dll, so instead we had to add it to the GAC, place an assembly reference to it in the Web.Config file () and restart IIS,  then this worked.

    • Marked as answer by sdfsda Thursday, February 17, 2011 6:07 PM
    Thursday, February 17, 2011 6:07 PM

All replies

  • Hello sdfsda,

    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and have a nice day.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 17, 2011 9:52 AM
  • Hello sdfsda,

    In response to your first question - i.e. Is the OpenXml SDK 2, version 2.0.5022.0, 64-bit or 32-bit?

    It's 32-bit

    Answer to your second question -  Is there any other way to reference the dll successfully in ASPX Code Behind pages without being able to use the normal GAC assembly reference

    You can also call it by putting the assembly in the /bin folder. If you want your CodeBehind to reference an
    assembly you would change it in the page directives, and place the assembly in the bin or GAC. There is a good discussion of this in the Forum site titled - "Application pages with code behind - without getting dll into GAC"
    http://social.msdn.microsoft.com/forums/en-us/sharepointdevelopment/thread/F83EF410-8F12-4139-BBD9-FD7A364E001D

    • Marked as answer by sdfsda Thursday, February 17, 2011 6:07 PM
    Thursday, February 17, 2011 4:05 PM
    Moderator
  • Okay, so here's our setup:

    We are using SP Designer to build out the SharePoint site (don't ask, we can't use VS, we are in a very restricted environment, etc.).  The live production server runs SP 2007 on a Windows 2008 R2 64-bit platform.  We had trouble figuring out the exact combo of steps to be able to reference the DocumentFormat.OpenXml dll.  With other dlls, usually all we had to do was place them in the GAC and then register them on the .aspx page we were using them on (with inline code, of course....again, this is crappy but this is what we have to put up with).  For some reason this did not work with the DocumentFormat.OpenXml.dll, so instead we had to add it to the GAC, place an assembly reference to it in the Web.Config file () and restart IIS,  then this worked.

    • Marked as answer by sdfsda Thursday, February 17, 2011 6:07 PM
    Thursday, February 17, 2011 6:07 PM