We have a build script that uses MSBuild to build our solution. It works great for VS2013, but it has broken since we installed VS2015 and updated it. Initially, this failed with this error:
C: \ Program Files (x86) \ MSBuild \ Microsoft.Cpp \ v4.0 \ V120 \ Microsoft.Cpp.Platform.targets (64.5): error MSB8020: build tools for v140 (Platform Toolset = 'v140') not can be found. To build using the v140 build tools, install the v140 build tools. Alternatively, yo can go to the current Visual Studio tools by selecting the Project menu or by right-clicking the solution, and then selecting "Upgra de Solution ...". [C: \ Users \ user \ Documents \ GitHub [snipped] Api.vcxproj]
Thus, he was unable to build the project in C ++, because by default he used version 12 of MSBuild, although it was a VS2015 project. So I added:
/tv:14.0
To invoke MSBuild to force it to use the correct version of tools. Now this fails:
C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ CodeAnalysis \ Microsoft.CodeAnalysis.targets (219.5): error MSB4175: that sk factory "CodeTaskFactory" could not be loaded from the assembly "C: \ Program Files (x86) \ MSBuild \ 14.0 \ bin \ Microsoft.Build.Tasks.v12.0.dll ". Failed to load file or assembly: /// C: \ Program Files (x86) \ MSBuild \ 14.0 \ bin \ Microsoft.Build.Tasks.v12.0.dll or one of its dependencies. The system cannot find the specified file. [C: \ Users \ User \ Documents \ GitHub [notch] .Api.vcxproj]
Now he is looking for the v12 assembly in the v14 folder. How to fix it? I do not see any obvious place for this change.
Note. The C ++ project itself can be a red herring, the solution is mainly C #, and it may just be the place where it is loaded into tasks.
source share