次の方法で共有


ProjectCollection.DefaultToolsVersion Property

Gets the default tools version of this project collection.

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.Evaluation
Assembly:  Microsoft.Build (in Microsoft.Build.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
Returns the default tools version of this project collection, which is always defined.

Remarks

This default value is obtained from the .exe.config file, from the system registry, or if neither is present, from the hard-coded tools version "2.0".

The set method throws InvalidOperationException if a toolset with the provided tools version has not been defined.

.NET Framework Security

See Also

Reference

ProjectCollection Class

Microsoft.Build.Evaluation Namespace