Project.DefaultToolsVersion Property

 

Sets or gets the ToolsVersion XML attribute found on the ProjectProject Element (MSBuild) element in the project file.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:   Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

public string DefaultToolsVersion { get; set; }

Property Value

Type: System.String

A string representing the Tools version.

If the ToolsVersion attribute is not present on the ProjectProject Element (MSBuild) element, getting the value returns the default Tools version of the parent Microsoft.Build.BuildEngine.

The DefaultToolsVersion value can differ from the Tools version used during a build if its value is overridden during construction of the Project instance or it is set to a specific value with the ToolsVersion property. Setting the DefaultToolsVersion value cannot change the Tools version if it has been overridden, but you can change the Tools version using the ToolsVersion property.

For more information about Tools versions, see MSBuild Tool Set (ToolsVersion).

Return to top
Show: