Skip to content

Commit 7532f3d

Browse files
authored
Merge pull request #6729 from rainersigwald/usingtask-schema
MSBuild: UsingTask runtime/architecture requirements
2 parents 33f5ad2 + d53c7af commit 7532f3d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/msbuild/how-to-configure-targets-and-tasks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,4 @@ The `MSBuildRuntime` and `MSBuildArchitecture` parameters provide the most flexi
109109
## See also
110110

111111
- [Configure targets and tasks](../msbuild/configuring-targets-and-tasks.md)
112+
- [UsingTask element](../msbuild/usingtask-element-msbuild.md)

docs/msbuild/usingtask-element-msbuild.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ Maps the task that is referenced in a [Task](../msbuild/task-element-msbuild.md)
4646

4747
|Attribute|Description|
4848
|---------------|-----------------|
49+
|`Architecture`|Optional attribute.<br /><br /> Specifies that the task must run in a process of the specified bitness. If the current process does not satisfy the requirement, the task will be run in a task host process that does.<br /><br /> Supported values are `x86` (32-bit), `x64` (64-bit), `CurrentArchitecture`, and `*` (any architecture).|
4950
|`AssemblyName`|Either the `AssemblyName` attribute or the `AssemblyFile` attribute is required.<br /><br /> The name of the assembly to load. The `AssemblyName` attribute accepts strong-named assemblies, although strong-naming is not required. Using this attribute is equivalent to loading an assembly by using the <xref:System.Reflection.Assembly.Load%2A> method in .NET.<br /><br /> You cannot use this attribute if the `AssemblyFile` attribute is used.|
5051
|`AssemblyFile`|Either the `AssemblyName` or the `AssemblyFile` attribute is required.<br /><br /> The file path of the assembly. This attribute accepts full paths or relative paths. Relative paths are relative to the directory of the project file or targets file where the `UsingTask` element is declared. Using this attribute is equivalent to loading an assembly by using the <xref:System.Reflection.Assembly.LoadFrom%2A> method in .NET.<br /><br /> You cannot use this attribute if the `AssemblyName` attribute is used.|
52+
|`Runtime`|Optional attribute.<br /><br /> Specifies that the task must run in a .NET Framework runtime of the specified version. If the current process does not satisfy the requirement, the task will be run in a task host process that does. Not supported in .NET Core MSBuild.<br /><br /> Supported values are `CLR2` (.NET Framework 3.5), `CLR4` (.NET Framework 4.7.2 or higher), `CurrentRuntime`, and `*` (any runtime).|
5153
|`TaskFactory`|Optional attribute.<br /><br /> Specifies the class in the assembly that is responsible for generating instances of the specified `Task` name. The user may also specify a `Task` as a child element that the task factory receives and uses to generate the task. The contents of the `Task` are specific to the task factory.|
5254
|`TaskName`|Required attribute.<br /><br /> The name of the task to reference from an assembly. If ambiguities are possible, this attribute should always specify full namespaces. If there are ambiguities, MSBuild chooses an arbitrary match, which could produce unexpected results.|
5355
|`Condition`|Optional attribute.<br /><br /> The condition to evaluate. For more information, see [Conditions](../msbuild/msbuild-conditions.md).|
@@ -105,5 +107,6 @@ The assembly containing the custom task is loaded when the `Task` is first used.
105107
## See also
106108

107109
- [Tasks](../msbuild/msbuild-tasks.md)
110+
- [How to: Configure targets and tasks](../msbuild/how-to-configure-targets-and-tasks.md)
108111
- [Task reference](../msbuild/msbuild-task-reference.md)
109112
- [Project file schema reference](../msbuild/msbuild-project-file-schema-reference.md)

0 commit comments

Comments
 (0)