Compartilhar via


TargetCollection.AddNewTarget(String) Method

Definition

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution

Adds a new <Target> element to the project file, at the very end.

public:
 Microsoft::Build::BuildEngine::Target ^ AddNewTarget(System::String ^ targetName);
public Microsoft.Build.BuildEngine.Target AddNewTarget (string targetName);
member this.AddNewTarget : string -> Microsoft.Build.BuildEngine.Target
Public Function AddNewTarget (targetName As String) As Target

Parameters

targetName
String

Returns

The new Target object.

Remarks

Warning

This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead: Microsoft.Build.Construction Microsoft.Build.Evaluation Microsoft.Build.Execution

Applies to