Skip to content

Commit 50467be

Browse files
committed
Toolset
1 parent 0d0bba4 commit 50467be

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/msbuild/msbuild-toolset-toolsversion.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ ms.workload:
1717
- "multiple"
1818
---
1919
# MSBuild Toolset (ToolsVersion)
20-
MSBuild uses a toolset of tasks, targets, and tools to build an application. Typically, a MSBuild toolset includes a *microsoft.common.tasks* file, a *microsoft.common.targets* file, and compilers such as *csc.exe* and *vbc.exe*. Most toolsets can be used to compile applications to more than one version of the .NET Framework and more than one system platform. However, the MSBuild 2.0 Toolset can be used to target only the .NET Framework 2.0.
20+
MSBuild uses a Toolset of tasks, targets, and tools to build an application. Typically, a MSBuild Toolset includes a *microsoft.common.tasks* file, a *microsoft.common.targets* file, and compilers such as *csc.exe* and *vbc.exe*. Most Toolsets can be used to compile applications to more than one version of the .NET Framework and more than one system platform. However, the MSBuild 2.0 Toolset can be used to target only the .NET Framework 2.0.
2121

2222
## ToolsVersion attribute
23-
Specify the toolset in the `ToolsVersion` attribute on the [Project](../msbuild/project-element-msbuild.md) element in the project file. The following example specifies that the project should be built by using the MSBuild 15.0 Toolset.
23+
Specify the Toolset in the `ToolsVersion` attribute on the [Project](../msbuild/project-element-msbuild.md) element in the project file. The following example specifies that the project should be built by using the MSBuild 15.0 Toolset.
2424

2525
```xml
2626
<Project ToolsVersion="15.0" ... </Project>
@@ -34,26 +34,26 @@ MSBuild uses a toolset of tasks, targets, and tools to build an application. Typ
3434

3535
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.
3636

37-
Starting in Visual Studio 2013, the MSBuild Toolset version is the same as the Visual Studio version number. MSBuild defaults to this toolset within Visual Studio and on the command line, regardless of the toolset version specified in the project file. This behavior can be overridden by using the /ToolsVersion flag. For more information, see [Override ToolsVersion settings](../msbuild/overriding-toolsversion-settings.md).
37+
Starting in Visual Studio 2013, the MSBuild Toolset version is the same as the Visual Studio version number. MSBuild defaults to this Toolset within Visual Studio and on the command line, regardless of the Toolset version specified in the project file. This behavior can be overridden by using the /ToolsVersion flag. For more information, see [Override ToolsVersion settings](../msbuild/overriding-toolsversion-settings.md).
3838

3939
In the following example, MSBuild finds the *Microsoft.CSharp.targets* file by using the `MSBuildToolsPath` reserved property.
4040

4141
```xml
4242
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4343
```
4444

45-
You can modify the value of `MSBuildToolsPath` by defining a custom toolset. For more information, see [Standard and custom toolset configurations](../msbuild/standard-and-custom-toolset-configurations.md)
45+
You can modify the value of `MSBuildToolsPath` by defining a custom Toolset. For more information, see [Standard and custom Toolset configurations](../msbuild/standard-and-custom-toolset-configurations.md)
4646

4747
When you build a solution on the command line and specify a `ToolsVersion` for *msbuild.exe*, all projects and their project-to-project dependencies are built according to that `ToolsVersion`, even if each project in the solution specifies its own `ToolsVersion`. To define the `ToolsVersion` value on a per project basis, see [Overriding ToolsVersion settings](../msbuild/overriding-toolsversion-settings.md).
4848

4949
The `ToolsVersion` attribute is also used for project migration. For example, if you open a Visual Studio 2008 project in Visual Studio 2010, the project file is updated to include ToolsVersion="4.0". If you then try to open that project in Visual Studio 2008, it doesn't recognize the upgraded `ToolsVersion` and therefore builds the project as though the attribute was still set to 3.5.
5050

51-
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 ToolsVersion 14.0, and Visual Studio 2017 uses ToolsVersion 15.0. In many cases, you can open the project in multiple versions of Visual Studio without modification. Visual Studio always uses the correct toolset, but you will be notified if the version used does not match the version in the project file. In almost all cases, this warning is benign as the toolsets are compatible in most cases.
51+
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 ToolsVersion 14.0, and Visual Studio 2017 uses ToolsVersion 15.0. In many cases, you can open the project in multiple versions of Visual Studio without modification. Visual Studio always uses the correct Toolset, but you will be notified if the version used does not match the version in the project file. In almost all cases, this warning is benign as the Toolsets are compatible in most cases.
5252

5353
Sub-toolsets, which are described later in this topic, allow MSBuild to automatically switch which set of tools to use based on the context in which the build is being run. For example, MSBuild uses a newer set of tools when it's run in Visual Studio 2012 than when it's run in Visual Studio 2010, without your having to explicitly change the project file.
5454

5555
## Toolset implementation
56-
Implement a toolset by selecting the paths of the various tools, targets, and tasks that make up the toolset. The tools in the toolset that MSBuild defines come from the following sources:
56+
Implement a Toolset by selecting the paths of the various tools, targets, and tasks that make up the Toolset. The tools in the Toolset that MSBuild defines come from the following sources:
5757

5858
- The .NET Framework folder.
5959

@@ -90,10 +90,10 @@ Alternately, you can determine the Toolset programmatically by calling the metho
9090
- <xref:Microsoft.Build.Utilities.ToolLocationHelper.GetPathToBuildTools%2A> returns the path of the build tools.
9191

9292
### Sub-toolsets
93-
For versions MSBuild prior to 15.0, MSBuild uses a registry key to specify the path of the basic tools. If the key has a subkey, MSBuild uses it to specify the path of a sub-toolset that contains additional tools. In this case, the toolset is defined by combining the property definitions that are defined in both keys.
93+
For versions MSBuild prior to 15.0, MSBuild uses a registry key to specify the path of the basic tools. If the key has a subkey, MSBuild uses it to specify the path of a sub-toolset that contains additional tools. In this case, the Toolset is defined by combining the property definitions that are defined in both keys.
9494

9595
> [!NOTE]
96-
> If toolset property names collide, the value that's defined for the subkey path overrides the value that's defined for the root key path.
96+
> If Toolset property names collide, the value that's defined for the subkey path overrides the value that's defined for the root key path.
9797
9898
Sub-toolsets become active in the presence of the `VisualStudioVersion` build property. This property may take one of these values:
9999

@@ -112,5 +112,5 @@ MSBuild provides overloads for the `ToolLocationHelper` methods that add a `Visu
112112
Sub-toolsets were introduced in the .NET Framework 4.5.
113113

114114
## See also
115-
[Standard and custom toolset configurations](../msbuild/standard-and-custom-toolset-configurations.md)
115+
[Standard and custom Toolset configurations](../msbuild/standard-and-custom-toolset-configurations.md)
116116
[Multitargeting](../msbuild/msbuild-multitargeting-overview.md)

0 commit comments

Comments
 (0)