共用方式為


ToolsetCollection Class

Represents one or more Toolset objects. A Toolset is a combination of a Toolset version (such as "2.0"), a tools path, and an optional set of associated properties.

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.

Inheritance Hierarchy

System.Object
  Microsoft.Build.BuildEngine.ToolsetCollection

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

Syntax

'Declaration
Public Class ToolsetCollection _
    Implements ICollection(Of Toolset), IEnumerable(Of Toolset),  _
    IEnumerable
public class ToolsetCollection : ICollection<Toolset>, 
    IEnumerable<Toolset>, IEnumerable
public ref class ToolsetCollection : ICollection<Toolset^>, 
    IEnumerable<Toolset^>, IEnumerable
type ToolsetCollection =  
    class 
        interface ICollection<Toolset>
        interface IEnumerable<Toolset>
        interface IEnumerable 
    end
public class ToolsetCollection implements ICollection<Toolset>, IEnumerable<Toolset>, IEnumerable

The ToolsetCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets a value indicating the number of Toolset objects in the ToolsetCollection.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.
Public property IsReadOnly Gets whether the ToolsetCollection is read-only. IsReadOnly always returns false because Toolsets are always writable.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.
Public property Item Gets the Toolset associated with the specified tools version.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.
Public property ToolsVersions Gets the names of the Toolsets stored in this 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.

Top

Methods

  Name Description
Public method Add Adds the specified Toolset to this 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.
Public method Clear Infrastructure. This method is not supported.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.
Public method Contains(String) Gets whether the collection contains a Toolset with the specified tools version.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.
Public method Contains(Toolset) Gets whether the collection contains a Toolset with the specified ToolsetCollection name.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.
Public method CopyTo Copies the contents of the ToolsetCollection to a compatible one-dimensional Array, starting at the specified index of the target array.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.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Gets an enumerator that iterates through the ToolsetCollection.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.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove Infrastructure. This method is not supported.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.
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Non-generic enumerator for the Toolsets in this 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.

Top

Remarks

ToolsetCollection allows you to retrieve individual Toolset objects by passing the string value of the tools version corresponding with the desired Toolset.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.BuildEngine Namespace