Represents a collection of all Target elements in a project.
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.TargetCollection
Namespace:  Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)
Syntax
'Declaration
Public Class TargetCollection _
    Implements IEnumerable, ICollection
public class TargetCollection : IEnumerable, 
    ICollection
public ref class TargetCollection : IEnumerable, 
    ICollection
type TargetCollection =  
    class 
        interface IEnumerable 
        interface ICollection 
    end
public class TargetCollection implements IEnumerable, ICollection
The TargetCollection type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| .gif) | Count | Gets a value indicating the number of Target objects in the TargetCollection.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. | 
| .gif) | IsSynchronized | Gets a value indicating whether access to the TargetCollection is synchronized (thread safe).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. | 
| .gif) | Item | Gets the specified Target object in the TargetCollection.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. | 
| .gif) | SyncRoot | Gets an object that can be used to synchronize access to the TargetCollection.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 | |
|---|---|---|
| .gif) | AddNewTarget | Adds a new Target element to the end of the project.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. | 
| .gif) | CopyTo | Copies the entire TargetCollection 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. | 
| .gif) | Equals | (Inherited from Object.) | 
| .gif) | Exists | Determines whether the specified Target exists in the TargetCollection.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. | 
| .gif) | Finalize | (Inherited from Object.) | 
| .gif) | GetEnumerator | Gets an enumerator that iterates through the TargetCollection.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. | 
| .gif) | GetHashCode | (Inherited from Object.) | 
| .gif) | GetType | (Inherited from Object.) | 
| .gif) | MemberwiseClone | (Inherited from Object.) | 
| .gif) | RemoveTarget | Removes the specified Target element from the project.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. | 
| .gif) | ToString | (Inherited from Object.) | 
Top
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.