I have Visual Studio 2013 and 2015 installed side by side. I have just upgraded the combined solution (C#, C++, C++/CLI) to 2015 and set Platform Toolset to v140.
The bu
Your problem is that you set the environment variable VisualStudioVersion
to 12.0
. This tells MSBuild to use the Visual Studio 2013 (V120) tools, which don't support the Visual Studio 2015 (V140) build tools. If you unset this environment variable, or pass the /p:VisualStudioVersion=14.0
option to MSBuild your project, should build. (Or at least get past this error).
You can find more information about the VisualStudioVersion variable in a MSDN blog entry titled Visual Studio project compatibility and VisualStudioVersion.