4
votes

Is it possible (and how) to use VS2015 IDE to build native C++ projects using the compiler, linker, the STL and everything else that comes with VS2008?

What I'm trying to do is called "C++ Native Multi-Targeting" and is known that e.g. VS2012 allows usage of VS2008 (v90) toolset, for C++ projects, via Project Properties->Configuration Properties->General->Platform Toolset=v90. Normally, out-of-the-box v90 will not be available, but will appear if you make side-by-side installations of VS2008+VS2010+VS2012 or VS2008+win7.1sdk+VS2012.

But I couldn't find so far any reported attempts at bridging the bigger gap between vs2008 and vs2015 for C++ projects. According to MSDN it seems that officially it's not supported. But I'd like to know if it might work anyway.

for reference, platform toolset values are:

Visual Studio .NET 2002 (Platform Toolset = 'v70')
Visual Studio .NET 2003 (Platform Toolset = 'v71')
Visual Studio 2005      (Platform Toolset = 'v80')
Visual Studio 2008      (Platform Toolset = 'v90')
Visual Studio 2010      (Platform Toolset = 'v100')
Visual Studio 2012      (Platform Toolset = 'v110')
Visual Studio 2013      (Platform Toolset = 'v112')
Visual Studio 2015      (Platform Toolset = 'v114')
1
It is not only possible, it is required if you need to build C++/CLI assemblies that are still compatible with CLR v2.0. What went wrong or did you not even try it yet? - Hans Passant
Not tried yet, wanted to ask others first. - V-R
It's a pity there is no "official" way to only install the old toolset without the whole old VS setup.. btw I have quite a fear installing and old VS over a new one since I feel that the old setups were not so "clean" ;) - Luke
I hope one day all kinds of setups will be available by 1 click via some kind of VM technology, both remotely and local. There are a lot of promising developments around containerization... As for old VS less clean, that's a funny notion. While I recognize how much better new VS has become, it also got bigger and more complex. I regard many proven old software versions as more respectful, humble and benign than newest versions. Not much to hold though against newest VS except maybe the telemetry. - V-R

1 Answers

2
votes

It should be possible. I have tried it but MSBuild fails with the following message:

1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(57,5): error : Required file "" is missing.

The only solution I have found so far was to add the following line in vcxproj file:

<PropertyGroup Label="Globals">
  ...
  <TrackFileAccess>false</TrackFileAccess>
</PropertyGroup>

Disadvantage: Always a complete build for every change