none
VSTO ADDIN when both excel 2010 and 2013 are installed on same computer RRS feed

  • Question

  • I am developing an excel 2010 AddIn project .Net framework 3.5

    when I publish the project it works well in these cases:

    - if user has only excel 2010 installed on his computer.

    - if user has only excel 2013 installed on his computer.

    but, when user has both excel 2010 & excel 2013 installed on his computer- the AddIn works only in excel 2013 version and does not work correctly in excel 2010.

    any idea?

    Thanks!

    Wednesday, October 16, 2013 8:00 AM

Answers

  • It is important to note that the VSTO technology was not designed to run in an environment with more than one version of Office installed. Nor is the parallel installation of multiple Office versions supported by Microsoft.

    I believe Xenacode's analysis is on-target. All calls to the PIAs will "re-map" to the newest version. If this weren't the case, you'd have to create a unique version of your add-in for every Office version.

    I can imagine two possible work-arounds:

    1. You compile your add-in using the .NET Framework 4.0 and activate "Embed interop types" for the PIAs. This will make the add-in PIA-independent as the information it uses will travel with the solution - it won't query PIAs installed on the user's machine.

    2. Use tlbimp.exe to create your own set of IAs from the Office type libraries. Set references to these instead of the PIAs and distribute them with your add-in.


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, October 16, 2013 12:11 PM
    Moderator

All replies