add-in stdole missing with Visual Studio C++ install RRS feed

  • Question

  • I have an add-in that works with both C++ and C# project types, with Visual Studio 2010, if i do a C++ only install, the add-in don't load because it could not load stdole.


    If i install it to GAC just works.

     "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" -i "C:\Program Files\Common Files\microsoft shared\MSEnv\PublicAssemblies\stdole.dll" 

    If i do a C# only install of Visual Studio , i don't need to manually add stdole to GAC
    Is there a way that i can get my add-in working with a VS 2010, without require that manual user step?
    When the exception is raised my add-in is trying to access the Tools command bar
    CommandBar toolsCmdBar = ((CommandBars)_applicationObject.CommandBars)["Tools"];

    See exception:
    Wednesday, November 23, 2011 9:43 PM

All replies

  • Hi

    Thank you for your question.

    Customer installation for VC++ only will not install the stdole.dll, it is a known issue. So far, as you can see,  the workaround is to also install VC# with VC++ or GACced stdole.  

    If the addin is developed by yourself, I suggest you package the stdole.dll into your installation pack, therefore we can depoly the stdole file with our add-in.



    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by pepone.onrez Friday, November 25, 2011 6:23 PM
    • Unmarked as answer by pepone.onrez Friday, December 9, 2011 9:47 PM
    Friday, November 25, 2011 7:11 AM
  •  is legal to redistribute stdole.dll with my addin? that is part of the Visual Studio SDK isn't it?




    Friday, November 25, 2011 10:09 PM
  • Hi Jose,

    I do not believe this is a redistributable component. So packaging and installing it with your addin is a bad idea. Is there a particular interface or construct in the stdole.dll assembly that your add-in is dependent on?

    I'm thinking it might be better to just replicate any needed interface definitions directly in your add-in.


    Ed Dore
    Saturday, November 26, 2011 3:56 AM
  • Hi Ed,


    Thanks for your replay.


    In my case the exceptions happens with this code:

    CommandBar toolsCmdBar = ((CommandBars)_applicationObject.CommandBars)["Tools"];


    _applicationObject is just a reference to DTE2 interface, not sure if there is other way to access the CommandBar, as C++ only install isn't very common i can live with users having to install both unless is something simple to fix.




    Tuesday, December 6, 2011 9:44 PM