ProjectRootElement.CreateUsingTaskElement Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a UsingTask Element (MSBuild) to the project.
Overloads
CreateUsingTaskElement(String, String, String, String, String) |
Creates a using task. Caller must add it to the location of choice in the project. Exactly one of assembly file and assembly name must be provided. Also allows providing optional runtime and architecture specifiers. Null is OK. |
CreateUsingTaskElement(String, String, String) |
Creates a using task. Caller must add it to the location of choice in the project. Exactly one of assembly file and assembly name must be provided. |
CreateUsingTaskElement(String, String, String, String, String)
- Source:
- ProjectRootElement.cs
Creates a using task. Caller must add it to the location of choice in the project. Exactly one of assembly file and assembly name must be provided. Also allows providing optional runtime and architecture specifiers. Null is OK.
public:
Microsoft::Build::Construction::ProjectUsingTaskElement ^ CreateUsingTaskElement(System::String ^ taskName, System::String ^ assemblyFile, System::String ^ assemblyName, System::String ^ runtime, System::String ^ architecture);
public Microsoft.Build.Construction.ProjectUsingTaskElement CreateUsingTaskElement (string taskName, string assemblyFile, string assemblyName, string runtime, string architecture);
member this.CreateUsingTaskElement : string * string * string * string * string -> Microsoft.Build.Construction.ProjectUsingTaskElement
Public Function CreateUsingTaskElement (taskName As String, assemblyFile As String, assemblyName As String, runtime As String, architecture As String) As ProjectUsingTaskElement
Parameters
- taskName
- String
The task name.
- assemblyFile
- String
The file path to the assembly.
- assemblyName
- String
The name of the assembly to load.
- runtime
- String
Optional runtime specifier.
- architecture
- String
Optional architecture specifier.
Returns
The UsingTask element.
Remarks
Caller must add the UsingTask element to the location of choice in the project. Either the assemblyName
or assemblyFile
must be null, but not both. Both the runtime
and architecture
can be null.
Applies to
CreateUsingTaskElement(String, String, String)
- Source:
- ProjectRootElement.cs
Creates a using task. Caller must add it to the location of choice in the project. Exactly one of assembly file and assembly name must be provided.
public:
Microsoft::Build::Construction::ProjectUsingTaskElement ^ CreateUsingTaskElement(System::String ^ taskName, System::String ^ assemblyFile, System::String ^ assemblyName);
public Microsoft.Build.Construction.ProjectUsingTaskElement CreateUsingTaskElement (string taskName, string assemblyFile, string assemblyName);
member this.CreateUsingTaskElement : string * string * string -> Microsoft.Build.Construction.ProjectUsingTaskElement
Public Function CreateUsingTaskElement (taskName As String, assemblyFile As String, assemblyName As String) As ProjectUsingTaskElement
Parameters
- taskName
- String
The task name.
- assemblyFile
- String
The file path to the assembly.
- assemblyName
- String
The name of the assembly to load.
Returns
The UsingTask element.
Remarks
The caller must add the UsingTask element to the location of choice in the project. Either the assemblyName
or assemblyFile
must be null
, but not both.