none
Word 2010 Application AddIn does not load

    Question

  • Our development machine is 64 bit hardware running Windows 7 Professional N (64 bit), 64 bit Office Professional 2010 and Visual Studio Professional 2010. 

    We created a Word 2010 (Application Level Addin) using .net framework 4 , Ribbons and windows installer targeting Office 2010 using this link http://msdn.microsoft.com/en-us/vsto/ff937654.aspx . We followed everything to the dot several times. For our installer we selected .net 4 client profile and windows installer 3.1 as prerequisites, since Office 2010 has VSTO 4.0 runtime installed and .net framework 4 has no-PIA functionality. In launch conditions we checked for Office 2010 Shared PIA and Word 2010 PIA availability using the appropriate component ids. Additionally we checked for VSTO runtime availability as  is laid out in the link aforementioned.

    Our addin loads and executes with full functionality from ONLY within Visual Studio debug (F5). Building the setup project creates the windows installer (msi). Installing it(msi) installs the addin on the machine without any errors either. However after installing the addin when we try to open any Word 2010 document, we are witnessing the following behavior...

    The first time we try open any Microsoft Word 2010 document, Word 2010 startup screen shows up and we can see our addin being loaded "Loading [Our]Addin"  but then Word 2010 does not open. The startup screen disappears and no error message is displayed. 

    Opening the word document for the second time just fires up this message (no word 2010 startup screen this time) "Word experienced a serious problem with the '[Our] word addin' add-in. If you have seen this message multiple times, you should disable this add-in and check to see if an update is available. do you want to disable this add-in?' 

    Clicking on No, briefly fires up the startup screen of Microsoft Word 2010 and then it stops loading again(disappears) Clicking on Yes, opens Word 2010 with the [Our] add in disabled. Verified by clicking File-Options-AddIns. Looked under Disabled Application Add-Ins 

    Setting VSTO_SUPPRESSDISPLAYALERTS=0 and VSTO_LOGALERTS=1 was of no use either. We checkeed our Temp directory, there were no logs.

    I installed and set up vsto troubleshooter (Windows PowerShell) from this link http://code.msdn.microsoft.com/vstotroubleshooter . The following is the output of
    ".\vstroubleshooter.ps1 info Word" when [Our] addin in disabled in Word 2010.
     
    ==============================================================
     Software's Installed 
    ============================================================== 
    Microsoft Windows 7 Professional N ( 64-bit ) 
    Office 2007 1 
    Office 2010 (32-bit) 0
    Office 2010 (64-bit) 1 
    ==============================================================
    VSTO Runtime 
    ============================================================== 
    VSTO Runtime 4.0 - (10.0.21022 Installed via Office 2010)
    VSTO Runtime 4.0 - (CLR35 components via Office 2010)
    VSTO Runtime 4.0 - (Unmanaged components via Office 2010)
    ============================================================== 
    AddIns Installed under Registry Path HKCU:\SOFTWARE\Microsoft\Office\Word\AddIns
    LoadBehavior 0: Unloaded, 1: Loaded, 2: Unloaded, 3: Loaded, 8: Unloaded, 9: Loaded, 16: Loaded To get values for LoadBehavior see http://msdn.microsoft.com/en-us/library/bb386106.aspx#LoadBehavior 
    ==============================================================
    OneNote Notes about Word Documents ( LoadBehavior: 0 ) 
    [Our] AddIn ( Load Behavior: 3) 
    Microsoft Word East European Fonts Tool ( LoadBehavior: 8 ) 
    ============================================================== 
    Solution Metadata under Registry Path HKCU:\Software\Microsoft\VSTO\SolutionMetadata
     ============================================================== 
    {09DBE83A-8F54-4DDD-95E7-2FBC94FD53D4} ( PreferredClr: v4.0.30319 )
    {23ED0609-9991-427E-9BFF-FB4741B839C9} ( PreferredClr: v4.0.30319 )
    {297E780A-6F2E-4389-9C52-A70AFD6EED5D} ( PreferredClr: v4.0.30319 )
    {2D5DE556-B1C4-4496-8F6B-162112142CD2} ( PreferredClr: v4.0.30319 ) 
    {37EF77D7-3DF5-486A-8373-3B90D673107E} ( PreferredClr: v4.0.30319 )
    {3A62BFB2-928F-4416-9BC0-6006E8B29347} ( PreferredClr: v4.0.30319 )
    {3C2A08AF-D70F-41A7-9575-CA6A151CD992} ( PreferredClr: v4.0.30319 )
    {3DB04618-F130-4A9E-8BEC-05BDCCA1DBEA} ( PreferredClr: v4.0.30319 ) 
    {51F5AB52-5D89-404D-A24E-7EFF05B42098} ( PreferredClr: v4.0.30319 )
    {659C8805-71EA-47E6-AFE1-F9EE77C063CB} ( PreferredClr: v4.0.30319 ) 
    {65DD0BBD-3511-4938-8EFF-273CBB4DF0F1} ( PreferredClr: v4.0.30319 )
    {78EF1D37-B0CE-42BE-A839-93BCC86A675D} ( PreferredClr: v4.0.30319 )
    {989CC438-434D-4B6C-B1CD-38CB5DDB0195} ( PreferredClr: v4.0.30319 )
    {A17F17B8-0CFA-4346-951A-8711EBD034EF} ( PreferredClr: v4.0.30319 )
    {A98EB492-5E16-4007-9D05-FFC350035387} ( PreferredClr: v4.0.30319 ) 
    {FB05E5FE-0A74-4556-9EA9-42E4DEB0C363} ( PreferredClr: v4.0.30319 ) 
    ============================================================== 
    VSTA Solutions under Registry Path HKCU:\Software\Microsoft\VSTA\Solutions
    ==============================================================
    ============================================================== 
    Hard-disabled AddIns for Word under HKCU:\Software\Wow6432Node\Microsoft\Office\12.0\Word\Resiliency\DisabledItems ============================================================== 
    ==============================================================
    Disabled AddIns for Word under HKCU:\Software\Microsoft\Office\14.0\Word\Resiliency\DisabledItems 
    ============================================================== 

    I'm surprised why [our] addin still shows load behavior 3 and is not listed under Disabled or Hard Disabled AddIns.

    Next, since the above method did not work I downloaded the sample project from this link http://code.msdn.microsoft.com/VSTO2010MSI named 'Deploying a VSTO 2010 solution for Office 2007/2010 using Windows Installer'  and used the appropriate project found under Office Development - Setup and Deployment Projects Samples\FX40\AddIn Deployment\All User Install for 64-bit Office.

    Initally I tested the solution to correctly load the demo excel 2010 add in project by creating and running the installer(msi) Then we added our Word AddIn project to the solution file by file and built it correctly (CTRL+SHIFT+B). It even ran from visual studio debug (F5) correctly. Then we reconfigured the existing set up project to delete the demo excel project and load our word  Addin primary output, [OurAddin].vsto and [OurAddin].dll.manifest files. We refreshed project dependencies and took appropriate steps to exclude relevant files. We kept the registry checks intact and added launch conditions to check for Word 2010 PIA. 

    The installer built successfully (msi), installed without errors but unfortunately we witnessed the exact same behavior of Word 2010 as described previously. 

    We tried debugging using windows event logging http://msdn.microsoft.com/en-us/library/cc442816.aspx .
     I found this event with event id 4096

    ************** Exception Text **************
    Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException: <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
     <framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
     <framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
    </compatibleFrameworks>
    
    
    However I found this link where Hamed Ahmadi explains this is no cause for an Addin not to load. http://blogs.msdn.com/b/vsto/archive/2010/04/06/why-is-frameworkversionmismatchexception-thrown-hamed-ahmadi.aspx
     

    We need to create an installer for our Word addin for both 32-bit and 64-bit Word 2010. Any guidance would be appreciated.
    Wednesday, October 06, 2010 12:17 PM

Answers

  • Hello All, Open XML SDK 2 was the cause, I avoided Open XML SDK 2 and my AddIn works perfectly now. Rebuilt my project from scratch using Microsoft Interop to read/write Microsoft Office 2010 documents. Issue is that there is not much documentation around for developers to read. I've done the grunt work reading articles and figuring out the problem myself. Hopefully others would not have to face the same ordeal.
    • Marked as answer by Hamza Zia Wednesday, October 20, 2010 5:08 AM
    Monday, October 18, 2010 12:48 PM

All replies

  • Our development machine is 64 bit hardware running Windows 7 Professional N (64 bit), 64 bit Office Professional 2010 and Visual Studio Professional 2010. 

    We created a Word 2010 (Application Level Addin) using .net framework 4 , Ribbons and windows installer targeting Office 2010 using this link http://msdn.microsoft.com/en-us/vsto/ff937654.aspx . We followed everything to the dot several times. For our installer we selected .net 4 client profile and windows installer 3.1 as prerequisites, since Office 2010 has VSTO 4.0 runtime installed and .net framework 4 has no-PIA functionality. In launch conditions we checked for Office 2010 Shared PIA and Word 2010 PIA availability using the appropriate component ids. Additionally we checked for VSTO runtime availability as  is laid out in the link aforementioned.

    Our addin loads and executes with full functionality from ONLY within Visual Studio debug (F5). Building the setup project creates the windows installer (msi). Installing it(msi) installs the addin on the machine without any errors either. However after installing the addin when we try to open any Word 2010 document, we are witnessing the following behavior...

    The first time we try open any Microsoft Word 2010 document, Word 2010 startup screen shows up and we can see our addin being loaded "Loading [Our]Addin"  but then Word 2010 does not open. The startup screen disappears and no error message is displayed. 

    Opening the word document for the second time just fires up this message (no word 2010 startup screen this time) &quot;Word experienced a serious problem with the '[Our] word addin' add-in. If you have seen this message multiple times, you should disable this add-in and check to see if an update is available. do you want to disable this add-in?' 

    Clicking on No, briefly fires up the startup screen of Microsoft Word 2010 and then it stops loading again(disappears) Clicking on Yes, opens Word 2010 with the [Our] add in disabled. Verified by clicking File-Options-AddIns. Looked under Disabled Application Add-Ins 

    Setting VSTO_SUPPRESSDISPLAYALERTS=0 and VSTO_LOGALERTS=1 was of no use either. We checkeed our Temp directory, there were no logs.

    I installed and set up vsto troubleshooter (Windows PowerShell) from this link http://code.msdn.microsoft.com/vstotroubleshooter . The following is the output of
    &quot;.\vstroubleshooter.ps1 info Word&quot; when [Our] addin in disabled in Word 2010.
     
    ==============================================================
     Software's Installed 
    ============================================================== 
    Microsoft Windows 7 Professional N ( 64-bit ) 
    Office 2007 1 
    Office 2010 (32-bit) 0
    Office 2010 (64-bit) 1 
    ==============================================================
    VSTO Runtime 
    ============================================================== 
    VSTO Runtime 4.0 - (10.0.21022 Installed via Office 2010)
    VSTO Runtime 4.0 - (CLR35 components via Office 2010)
    VSTO Runtime 4.0 - (Unmanaged components via Office 2010)
    ============================================================== 
    AddIns Installed under Registry Path HKCU:\SOFTWARE\Microsoft\Office\Word\AddIns
    LoadBehavior 0: Unloaded, 1: Loaded, 2: Unloaded, 3: Loaded, 8: Unloaded, 9: Loaded, 16: Loaded To get values for LoadBehavior see http://msdn.microsoft.com/en-us/library/bb386106.aspx#LoadBehavior 
    ==============================================================
    OneNote Notes about Word Documents ( LoadBehavior: 0 ) 
    [Our] AddIn ( Load Behavior: 3) 
    Microsoft Word East European Fonts Tool ( LoadBehavior: 8 ) 
    ============================================================== 
    Solution Metadata under Registry Path HKCU:\Software\Microsoft\VSTO\SolutionMetadata
     ============================================================== 
    {09DBE83A-8F54-4DDD-95E7-2FBC94FD53D4} ( PreferredClr: v4.0.30319 )
    {23ED0609-9991-427E-9BFF-FB4741B839C9} ( PreferredClr: v4.0.30319 )
    {297E780A-6F2E-4389-9C52-A70AFD6EED5D} ( PreferredClr: v4.0.30319 )
    {2D5DE556-B1C4-4496-8F6B-162112142CD2} ( PreferredClr: v4.0.30319 ) 
    {37EF77D7-3DF5-486A-8373-3B90D673107E} ( PreferredClr: v4.0.30319 )
    {3A62BFB2-928F-4416-9BC0-6006E8B29347} ( PreferredClr: v4.0.30319 )
    {3C2A08AF-D70F-41A7-9575-CA6A151CD992} ( PreferredClr: v4.0.30319 )
    {3DB04618-F130-4A9E-8BEC-05BDCCA1DBEA} ( PreferredClr: v4.0.30319 ) 
    {51F5AB52-5D89-404D-A24E-7EFF05B42098} ( PreferredClr: v4.0.30319 )
    {659C8805-71EA-47E6-AFE1-F9EE77C063CB} ( PreferredClr: v4.0.30319 ) 
    {65DD0BBD-3511-4938-8EFF-273CBB4DF0F1} ( PreferredClr: v4.0.30319 )
    {78EF1D37-B0CE-42BE-A839-93BCC86A675D} ( PreferredClr: v4.0.30319 )
    {989CC438-434D-4B6C-B1CD-38CB5DDB0195} ( PreferredClr: v4.0.30319 )
    {A17F17B8-0CFA-4346-951A-8711EBD034EF} ( PreferredClr: v4.0.30319 )
    {A98EB492-5E16-4007-9D05-FFC350035387} ( PreferredClr: v4.0.30319 ) 
    {FB05E5FE-0A74-4556-9EA9-42E4DEB0C363} ( PreferredClr: v4.0.30319 ) 
    ============================================================== 
    VSTA Solutions under Registry Path HKCU:\Software\Microsoft\VSTA\Solutions
    ==============================================================
    ============================================================== 
    Hard-disabled AddIns for Word under HKCU:\Software\Wow6432Node\Microsoft\Office\12.0\Word\Resiliency\DisabledItems ============================================================== 
    ==============================================================
    Disabled AddIns for Word under HKCU:\Software\Microsoft\Office\14.0\Word\Resiliency\DisabledItems 
    ============================================================== 

    I'm surprised why [our] addin still shows load behavior 3 and is not listed under Disabled or Hard Disabled AddIns.

    Next, since the above method did not work I downloaded the sample project from this link http://code.msdn.microsoft.com/VSTO2010MSI named 'Deploying a VSTO 2010 solution for Office 2007/2010 using Windows Installer'  and used the appropriate project found under Office Development - Setup and Deployment Projects Samples\FX40\AddIn Deployment\All User Install for 64-bit Office.

    Initally I tested the solution to correctly load the demo excel 2010 add in project by creating and running the installer(msi) Then we added our Word AddIn project to the solution file by file and built it correctly (CTRL+SHIFT+B). It even ran from visual studio debug (F5) correctly. Then we reconfigured the existing set up project to delete the demo excel project and load our word  Addin primary output, [OurAddin].vsto and [OurAddin].dll.manifest files. We refreshed project dependencies and took appropriate steps to exclude relevant files. We kept the registry checks intact and added launch conditions to check for Word 2010 PIA. 

    The installer built successfully (msi), installed without errors but unfortunately we witnessed the exact same behavior of Word 2010 as described previously. 

    We tried debugging using windows event logging http://msdn.microsoft.com/en-us/library/cc442816.aspx .
     I found this event with event id 4096

    ************** Exception Text **************
    Microsoft.VisualStudio.Tools.Applications.Deployment.FrameworkVersionMismatchException: <compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2">
     <framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
     <framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
    </compatibleFrameworks>
    
    
    However I found this link where Hamed Ahmadi explains this is no cause for an Addin not to load. http://blogs.msdn.com/b/vsto/archive/2010/04/06/why-is-frameworkversionmismatchexception-thrown-hamed-ahmadi.aspx
     

    We need to create an installer for our Word addin for both 32-bit and 64-bit Word 2010. Any guidance would be appreciated.
    Wednesday, October 06, 2010 12:33 PM
  • Hi Hanza Zia

    I've moved your question in the Word Developer forum here, then merged the two questions. The VSTO forum is definitely the place to ask this - you won't find anyone else with a better idea in Word Developer. and this will prevent duplication of effort and make it easier for everyone to follow the discussion :-)

    Deployment isn't my forté, so I won't be able to help you with this...


    Cindy Meister, VSTO/Word MVP
    Wednesday, October 06, 2010 1:00 PM
    Moderator
  • Hanza Zia,

    in http://msdn.microsoft.com/en-us/vsto/ff937654.aspx, there is this section:

    Special considerations for Registering All User Add-ins for Office 2010 64-bit: Office 2010 64 bit looks for the add-
    in registry keys under the 64-bit hive. In order to register add-ins under the native 64-bit registry hive, the setup
    project’s target platform must be set to 64-bit only.

    did you set the TargetPlatform property to x64 before installing on a 64-bit computer?

    as for having a single installer, the general concensus if that you should have two separate installers: one for 32-bit and one for 64-bit. see http://msdn.microsoft.com/en-us/library/cd7a85k9.aspx.

    m.

    Thursday, October 07, 2010 10:48 PM
    Moderator
  • DMary,

     

    Please find my answered inlined.

    >>Did you set the TargetPlatform property to x64 before installing on a 64-bit computer?

    Yes, I did. 

     

    >>As for having a single installer, the general concensus if that you should have two separate installers: one for 32-bit and one for 64-bit. see

    Thanks for the link. I was already aware though.

     

    Anything else you suggest that we can try?

     

    P.S

    My first name is Hamza and not Hanza

     


    Friday, October 08, 2010 4:50 AM
  • Hello,

    I used AddInSpy to investigate further and this is the debug information I get ...

     

    <addIn>
     <Item>1</Item> 
     <Host>Word</Host> 
     <Running>true</Running> 
     <Loaded>false</Loaded> 
     <Type>VSTO</Type> 
     <FriendlyName>[OURADDIN]WordAddIn</FriendlyName> 
     <ProgID>[OURADDIN].WordAddIn</ProgID> 
     <CLSID>n/a</CLSID> 
     <Manifest>C:\Program Files\Microsoft\[OURADDIN]Setup2010\[OURADDIN]WordAddIn.vsto|vstolocal</Manifest> 
     <DllPath>C:\Program Files\Microsoft\[OURADDIN]Setup2010\[OURADDIN]WordAddIn.dll</DllPath> 
     <LoadBehavior>3</LoadBehavior> 
     <RegHive>HKCU</RegHive> 
     <AssemblyName>?</AssemblyName> 
     <CLR_version>?</CLR_version> 
     <Exposed>false</Exposed> 
     <Interfaces>?</Interfaces> 
     <FormRegions>n/a</FormRegions> 
     <VSTOR>2008</VSTOR> 
     <Installed>?</Installed> 
     <PubVer>n/a</PubVer> 
     <Status>Alert</Status> 
     <StatusDescription>Add-in DLL path is not found. System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files\Microsoft\[OURADDIN]Setup2010\[OURADDIN].dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
    File name: 'file:///C:\Program Files\Microsoft\[OURADDIN]Setup2010\[OURADDIN].dll'
      at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
      at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
      at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
      at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
      at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
      at AddInSpy.AssemblyScanner.GetAssemblyInfo(String fileName, String hostName, Boolean isVstoAddIn)
    
    Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    Running under executable C:\Users\Interance\Downloads\AddInSpy\AddInSpy.exe
    --- A detailed error log follows. 
    
    === Pre-bind state information ===
    LOG: User = Interance-PC\Interance
    LOG: Where-ref bind. Location = C:\Program Files\Microsoft\[OURADDIN]Setup2010\[OURADDIN].dll
    LOG: Appbase = file:///C:/Users/Interance/Downloads/AddInSpy/
    LOG: Initial PrivatePath = NULL
    Calling assembly : (Unknown).
    ===
    LOG: This is an inspection only bind.
    LOG: No application configuration file found.
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft/[OURADDIN]Setup2010/[OURADDIN]AddIn.dll.
    ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated.
    </StatusDescription> 
     </addIn>
    

    I believe what is interesting above are the following lines 

    This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded...

    Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll

    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.

     

    In my understanding Word 2010 is trying to load my addin using Assembly Manager and Machine Configuration File referencing F/W version v2.0.50727 when it should be referencing \Framework64\v4.0.30319\ since I've built my addin using .net 4. As a consequence is the error message 'This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded...'

    I think this might be the source. Any thoughts why this might be happening and how to resolve it?

     

    Any help would be appreciated.

    Friday, October 08, 2010 1:42 PM
  • Hello,

    Hmm... I think I should have mentioned this earlier but I'm using open xml 2 sdk  to create/read word files in my Word 2010 addin with .net f/w 4. I've used documentation provided here http://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx . If you scroll down that page you will find in the section Introducing Open XML SDK Format Architecture subsection system support layer that it supports .net f/w 3.5 and  Currently the Open XML Format SDK is based on Standard Ecma-376.

    Furthermore, after couple of hours of squinting and reading lots of articles such as Chris Rae's  http://blogs.msdn.com/b/chrisrae/archive/2010/09/25/where-is-the-documentation-for-office-2010-s-docx-xlsx-pptx-formats.aspx and http://blogs.msdn.com/b/chrisrae/archive/2010/10/06/where-is-the-documentation-for-office-s-docx-xlsx-pptx-formats-part-2-office-2010.aspx where he states that Office 2010 uses another standard, ISO/IEC 29500, as its default file format while Office 2007 supports ECMA-376. Further it states that 'ISO/IEC 29500 is a direct descendant of ECMA-376. It's so direct a descendant, in fact, that ECMA-376 2nd edition is identical to ISO/IEC 29500.

     

    I found that Open XML SDK Format Architecture system support layer supports .net f/w 3.5 and 'Currently the Open XML Format SDK 2 is based on Standard Ecma-376.' http://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx

    Therefore I'm just wondering if Open XML SDK 2 is the source of my problem? Since ISO/IEC 29500 is descendant of ECMA-376, can I use Open XML SDK 2 to create/modify word 2010 documents in my code? 

    Is that why the assembly manager and machine configuration file are loading from framework\v2.0.50727\ and not from \Framework64\v4.0.30319\ 

    Any suggestions would be greatly appreciated.

     

     

    • Edited by Hamza Zia Monday, October 11, 2010 8:38 AM Better Formatting
    Monday, October 11, 2010 8:37 AM
  • Hello All, Open XML SDK 2 was the cause, I avoided Open XML SDK 2 and my AddIn works perfectly now. Rebuilt my project from scratch using Microsoft Interop to read/write Microsoft Office 2010 documents. Issue is that there is not much documentation around for developers to read. I've done the grunt work reading articles and figuring out the problem myself. Hopefully others would not have to face the same ordeal.
    • Marked as answer by Hamza Zia Wednesday, October 20, 2010 5:08 AM
    Monday, October 18, 2010 12:48 PM
  • Hi Hamza

    Thank you very much for taking the time to come back and report the results of your research. I'm not sure anyone in this forum would have hit on the solution, as there's not a lot of OpenXML expertise, here. But there are definitely folks, like yourself, who do combine the technologies and may experience the same problem.

    It's definitely not a good thing if OpenXML is in conflict with VSTO in this way, as what you were trying to do would have been the "right thing"...

    Rather than generating the documents via the Interop, I have to wonder whether it wouldn't be (have been) possible to create a "document generation tool" that would run independently of the Add-in, and could be invoked by it? A dll or console app would be in a different domain and wouldn't fall foul of the framework mismatch?


    Cindy Meister, VSTO/Word MVP
    Monday, October 18, 2010 2:26 PM
    Moderator
  • Hi Cindy,

     

    Yes, you are right on the possibility of creating a "document generation tool".  I wish my schedule would permit me to invest more time into that. Currently, I'm swamped.

     

    P.S

    This is the reply I received from Chris Rae after asking him the question about Open XML SDK 2 compatibility with Office 2010.

    "Hello there - you can indeed use the Open XML SDK 2 to edit Word 2010 content. Many thanks for reading my blog!"

    This was my question to him 

    "Hello, I've read your blogs about Office 2010 using standard ISO/IEC 2950, while Office 2007 supports ECMA-376. Further you state that 'ISO/IEC 29500 is a direct descendant of ECMA-376. It's so direct a descendant, in fact, that ECMA-376 2nd edition is identical to ISO/IEC 29500.' I found that Open XML SDK Format Architecture system support layer supports .net f/w 3.5 and 'Currently the Open XML Format SDK 2 is based on Standard Ecma-376.' http://msdn.microsoft.com/en-us/library/dd440953(v=office.12).aspx Since ISO/IEC 29500 is descendant of ECMA-376, can I use Open XML SDK 2 to create/modify word 2010 documents in my code? Thanks in advance for your co-operation."

     

    Wednesday, October 20, 2010 5:07 AM
  • Hi,

    I am having the exact same problem with my word add-in (Vista, word 2010).  Same error message from add-in spy.  I've tried installing .NET 4.5, didn't help.

    The weird thing is that it worked fine originally, then the computer died and was rebuilt from an image and now it won't work on the new box.

    Did you have any luck troubleshooting it?

    Thanks

    Neva

    Tempo Allegro

    Monday, March 10, 2014 11:34 PM