Reputation: 29
I have a C++ project in VS 2017. Tools version in .vcxproj file is 15.0 whereas in .vcxproj.filters is 4.0.
Project.vcxproj:-
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Project.vcxproj.filters:-
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
I am not able to figure out the reason for difference between these Tools Version. Can anyone please explain.
Upvotes: 0
Views: 2350
Reputation: 38465
ToolsetVersion
attribute specifies the MSBuild Toolset version. Visual Studio 2010 and Visual Studio 2012 use a ToolsVersion of 4.0. Visual Studio 2013 uses a ToolsVersion of 12.0. Visual Studio 2015 uses a ToolsVersion of 14.0. Visual Studio 2017 uses a ToolsVersion of 15.0.
MSBuild Toolset of 15.0 is located by default here: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0
MSBuild documentation: (link)
ToolsVersion Attribute Specify the Toolset in the ToolsVersion attribute on the Project element in the project file. The above example specifies that the project should be built by using the MSBuild 15.0 Toolset.
How the ToolsVersion Attribute Works When you create a project in Visual Studio, or upgrade an existing project, an attribute named ToolsVersion is automatically included in the project file and its value corresponds to the version of MSBuild that is included in the Visual Studio edition.
When a ToolsVersion value is defined in a project file, MSBuild uses that value to determine the values of the Toolset properties that are available to the project. One Toolset property is
$(MSBuildToolsPath)
, which specifies the path of the .NET Framework tools. Only that Toolset property (or$(MSBuildBinPath)
), is required.
Upvotes: 0