Project.DefaultToolsVersion Property

Definition

Gets or sets the ToolsVersion XML attribute found on the Project element in the project file.

public:
 property System::String ^ DefaultToolsVersion { System::String ^ get(); void set(System::String ^ value); };
public string DefaultToolsVersion { get; set; }
member this.DefaultToolsVersion : string with get, set
Public Property DefaultToolsVersion As String

Property Value

A string representing the Tools version.

Remarks

If the ToolsVersion attribute is not present on the Project 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 DefaultToolsVersion 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 ToolSet (ToolsVersion).

Applies to