4

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')
V-R
  • 1,309
  • 16
  • 32
  • 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 Jan 20 '16 at 16:56
  • Not tried yet, wanted to ask others first. – V-R Jan 20 '16 at 17:37
  • 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 Nov 09 '17 at 15:59
  • 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 Nov 10 '17 at 17:14

1 Answers1

2

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

pruf
  • 36
  • 1
  • Thanks for reporting your experience! Which SDKs and Visual Studio versions are installed side by side in your setup? – V-R Jan 25 '16 at 11:16
  • 1
    Visual Studio 6.0, Visual Studio .NET 2003, Visual Studio 2008 and Visual Studio 2015. SDK's: Only the SDK's that come along with the Visual Studios. At the moment still looking for a solution to make this work without switching-off the file tracker (I think this should normally work out of the box as long as there is Visual Studio 2008 installed side by side). – pruf Jan 25 '16 at 14:56
  • 1
    News on this topic: Windows SDK 7.1 has been installed manually Prior to the Visual Studio 2015 installation (this was missed in my first comment). Without Windows SDK7.1 it is not even possible to choose the Visual Studio 2008 (v90) tools. – pruf Feb 08 '16 at 14:34
  • Thanks @pruf. So my best bet is to install Visual Studio 2008, Windows SDK 7.1 and then Visual Studio 2015 (although problem with TrackFileAccess is expected). Will do that once I get the 2nd workstation which I can safely trash. If you already have the setup, could you perhaps also check whether Code Maps can be used at all in vs2015 on a C++ project that uses v90/vs2008 toolset? This was actually my main reason for wanting to create such setup. – V-R Feb 08 '16 at 17:24
  • About TrackFileAccess: in http://stackoverflow.com/a/35118409/5140740 they say "Use WindowsSdkVer.exe to set current SDK to 7.1 to defeat cryptic error in Microsoft.Cpp.x64.Targets(63,5) about missing unnamed required file". – V-R Feb 08 '16 at 17:53
  • 2
    @V-R: Newest Information is that Visual Studio 2010 needs to be installed side by side with Visual Studio 2008 and Visual Studio 2015. What a pity! Looks like one needs to have all Visual Studios installed just to compile with a certain tool chain. Code Maps test ist not possible. – pruf Feb 11 '16 at 09:20
  • Native MultiTargeting Platform Toolset installer: http://daffodil.codeplex.com/ "Visual Studio 2012/2013/2015 Daffodil works fine in VS 2012 and later versions as long as VS 2010 is also installed." – V-R Jun 12 '17 at 13:59