Project.DefaultToolsVersion Property

Sets or gets the ToolsVersion XML attribute found on the [Project]d1cda56a-dbef-4109-9201-39e962e3f653 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)

Syntax

'Declaration
Public Property DefaultToolsVersion As String
public string DefaultToolsVersion { get; set; }
public:
property String^ DefaultToolsVersion {
    String^ get ();
    void set (String^ value);
}
member DefaultToolsVersion : string with get, set
function get DefaultToolsVersion () : String 
function set DefaultToolsVersion (value : String)

Property Value

Type: System.String
A string representing the Tools version.

Remarks

If the ToolsVersion attribute is not present on the [Project]d1cda56a-dbef-4109-9201-39e962e3f653 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).

.NET Framework Security

See Also

Reference

Project Class

Microsoft.Build.BuildEngine Namespace