none
Best Method for Building Software Against Multiple Visual Studio Versions

    Question

  • I need to build a C++ plug-in for another application which, for complicated reasons, may be built in VS2010, VS2012, or VS2013.  Is it possible for me to build my plug-in against each of these versions of the VS C++ runtime without installing all three versions of visual studio?  If so, how can this be done and what steps must be taken to accomplish this?

    Thanks all!

    Tuesday, July 19, 2016 8:55 PM

Answers

All replies

  • Hi jgBecker,

    Thank you for your post.


    Firstly, for this question, could you please tell us more detailed information about the plug-in?
    Is it a C++dll or a sample?


    If you would like to run it in different VC++ runtime environment, you could install Visual C++ Redistributable for different versions.
    For example, here is he Visual C++ Redistributable for Visual Studio 2015 download link:
    https://www.microsoft.com/en-sg/download/details.aspx?id=48145

    Best Regards,

    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.

    Wednesday, July 20, 2016 7:09 AM
    Moderator
  • The plug-in I am building is a C++ DLL for a simulation application which is also written in C++ (with a rudimentary plug-in system).  When we build our plug-in with VS2013, for instance, and attempt to load that plug-in into the simulation application which was build in VS2010 (because a client had built it that way and does not have access to VS2013) then the plug-in cannot be loaded.

    For this reason it seems that we need to build this plug-in within multiple versions of Visual Studio to satisfy our client's potential needs (since the clients build the simulation application themselves).

    Wednesday, July 20, 2016 1:42 PM
  • >When we build our plug-in with VS2013, for instance, and attempt to load that plug-in into the simulation application which was build in VS2010 (because a client had built it that way and does not have access to VS2013) then the plug-in cannot be loaded.

    It sounds like your plug-in interface depends on run-time data types
    and you'll also depend on building with the DLL versions of the
    run-time libraries. If it was designed with POD (plain old data)
    types, you shouldn't have any such issues.

    It's a bit late now though I guess - you've got to live with the
    headache!

    Dave

    Wednesday, July 20, 2016 3:07 PM
  • >I need to build a C++ plug-in for another application which, for complicated reasons, may be built in VS2010, VS2012, or VS2013.  Is it possible for me to build my plug-in against each of these versions of the VS C++ runtime without installing all three versions of visual studio?  If so, how can this be done and what steps must be taken to accomplish this?

    You will need to have each toolset installed, but you should be able
    to use just the later version of VS as your IDE to build each version.

    https://blogs.msdn.microsoft.com/vcblog/2016/02/24/stuck-on-an-older-toolset-version-move-to-visual-studio-2015-without-upgrading-your-toolset/

    Dave

    Wednesday, July 20, 2016 3:13 PM
  • Thanks Dave!

    Since we are, indeed, using run-time data types then we must compile against the different run-time libraries.

    I would like to focus the question on the nature of Visual Studio's build feature then.  Is there any installer available which provides only the compilers and not the various full VS IDEs?  Or perhaps is there a way to compile from the latest version of VS back to an older version (VS2015 to VS2010 for instance)?

    At this point I'm trying to determine if I must install the full version of all Visual Studio versions which I want to build against on a build machine.

    Wednesday, July 20, 2016 3:26 PM
  • >Is there any installer available which provides only the compilers and not the various full VS IDEs?

    I think some of the Windows SDKs came with the compiler and linker,
    but it's not something I've needed to do, so I don't have any
    experience of doing it that way.

    Dave

    Wednesday, July 20, 2016 4:03 PM