Condividi tramite


ProjectRootElement.AddUsingTask(String, String, String) Method

Definition

Convenience method that picks a location based on a heuristic: Creates a usingtask at the end of the project. Exactly one of assemblyName or assemblyFile must be null.

public:
 Microsoft::Build::Construction::ProjectUsingTaskElement ^ AddUsingTask(System::String ^ name, System::String ^ assemblyFile, System::String ^ assemblyName);
public Microsoft.Build.Construction.ProjectUsingTaskElement AddUsingTask (string name, string assemblyFile, string assemblyName);
member this.AddUsingTask : string * string * string -> Microsoft.Build.Construction.ProjectUsingTaskElement
Public Function AddUsingTask (name As String, assemblyFile As String, assemblyName As String) As ProjectUsingTaskElement

Parameters

name
String

The task name.

assemblyFile
String

The file path to the assembly.

assemblyName
String

The name of the assembly to load.

Returns

The added UsingTask element.

Remarks

Either the assemblyName or assemblyFile must be null, but not both.

Applies to