locked
VCProjectEngine for different VS versions RRS feed

  • Question

  • I am writing a Visual Studio extension that uses Microsoft.VisualStudio.VCProjectEngine.dll.  There appears to be a different version of this DLL for each version of Visual Studio.

    Is there some way to get it so that my extension uses the version that comes with whatever version of Visual Studio it is running in?

    Tuesday, August 11, 2015 11:49 PM

Answers

  • Unfortunately, the VC++ team reguid's the interfaces on each major release, so each interface is essentially unique across versions.

    This effectively prevents you from using the oldest as a least common denominator scenario, that works with other interfaces.

    I've never come across a clean/easy solution for this. But you may find Carlos's response from an earlier thread helpful.

       VCProject interface targeting multiple versions

    Sincerely,


    Ed Dore

    • Marked as answer by Caillen Friday, August 21, 2015 3:23 AM
    Friday, August 14, 2015 9:22 PM

All replies

  • Hi diltsman,

    The general way is to use the lower version of the assembly, but if you want to use some new features, you have to switch to the new version, which may have some compatibility issues with the previous versions.

    There's no unified way to use just one assembly across all the VS versions. To make sure there're no problems, I would recommend that you create different project for different VS version.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 13, 2015 8:54 AM
  • I tried that initially.

    When I installed on VS2015 it didn't work. The object type changed from VCProject to VCProjectShim. I can only assume that this has something to do with DLL versions. As soon as I changed to reference the VS2015 version of the DLL it worked in VS2015 (VCProject).

    All other references are still to the VS2013 DLLs.

    Friday, August 14, 2015 2:32 PM
  • Unfortunately, the VC++ team reguid's the interfaces on each major release, so each interface is essentially unique across versions.

    This effectively prevents you from using the oldest as a least common denominator scenario, that works with other interfaces.

    I've never come across a clean/easy solution for this. But you may find Carlos's response from an earlier thread helpful.

       VCProject interface targeting multiple versions

    Sincerely,


    Ed Dore

    • Marked as answer by Caillen Friday, August 21, 2015 3:23 AM
    Friday, August 14, 2015 9:22 PM
  • Would using Reflection to dynamically load the version of the VCProjectEngine you need at runtime be a terrible idea? Basically, detect which version of Visual Studio you're running in, and then load that version of the dll?

    Thursday, November 29, 2018 7:22 PM