Microsoft.Build.Tasks 命名空间

包含 MSBuild 附带的所有任务的实现。 Contains the implementation of all tasks shipping with MSBuild. 有关信息,请参阅 MSBuild For information, see MSBuild.

AL

此类定义了 "AL" XMake 任务,使用 al.exe 可以将模块和资源文件链接到程序集。This class defines the "AL" XMake task, which enables using al.exe to link modules and resource files into assemblies.

AppDomainIsolatedTaskExtension

此类提供与 Task 类相同但派生自 MarshalByRefObject 的功能,以便可以在其自己的应用域中进行实例化。This class provides the same functionality as the Task class, but derives from MarshalByRefObject so that it can be instantiated in its own app domain.

AspNetCompiler

AspNetCompiler 任务,它是 aspnet_compiler.exe 的包装器The AspNetCompiler task, which is a wrapper around aspnet_compiler.exe

AssignCulture

类:AssignCultureClass: AssignCulture 此任务使用资源文件名列表,并设置特性,其中包含文件名中嵌入的区域性名称:This task takes a list of resource file names and sets an attribute that contains the culture name embedded in the file name: MyResources.fr.resx ==> Culture='fr'MyResources.fr.resx ==> Culture='fr' 该任务还可返回“非特定区域性”文件名的列表,如下所示:The task can also return a list of "Culture-neutral" file names, like: MyGlyph.fr.bmp ==> MyGlyph.bmp [Culture='fr']MyGlyph.fr.bmp ==> MyGlyph.bmp [Culture='fr'] 这是因为嵌入的资源是以这种方式引用的。This is because embedded resources are referred to this way.

此任务有很多极端情况。There are plenty of corner cases with this task. 有关更多详细信息,请参阅单元测试。See the unit test for more details.

AssignLinkMetadata

用于为提供的项分配合理“Link”元数据的任务。Task to assign a reasonable "Link" metadata to the provided items.

AssignProjectConfiguration

将 XML 项目配置分配给项目引用任务项。Assigns XML project configurations to project reference task items.

AssignTargetPath

如果输入中没有包含 <TargetPath> 特性的项,则创建这些项的新列表。Create a new list of items that have <TargetPath> attributes if none was present in the input.

CallTarget

实现 CallTarget 任务。Implements the CallTarget task. 使用项目文件中的 CallTarget 元素创建和执行此任务。Use the CallTarget element in your project file to create and execute this task. 有关用法和参数信息,请参阅 CallTarget 任务For usage and parameter information, see CallTarget Task.

CodeTaskFactory

一个任务工厂,它可采用支持代码 DOM 的语言并用该语言创建任务A task factory which can take code dom supported languages and create a task out of it

CombinePath

用于调用 Path.Combine 的任务。Task to call Path.Combine.

CommandLineBuilderExtension

CommandLineBuilder 派生类,用于特定于 MSBuild 任务的专用逻辑CommandLineBuilder derived class for specialized logic specific to MSBuild tasks

ConvertToAbsolutePath

用于调用 Path.GetFullPath 的任务Task to call Path.GetFullPath

Copy

复制文件的任务。A task that copies files.

CreateCSharpManifestResourceName

任务的基类,用于确定要分配给给定 resx 或其他资源的相应清单资源名称。Base class for task that determines the appropriate manifest resource name to assign to a given resx or other resource.

CreateItem

将项列表从输入转发到输出。Forward a list of items from input to output. 这允许动态项列表。This allows dynamic item lists.

CreateManifestResourceName

任务的基类,用于确定要分配给给定 resx 或其他资源的相应清单资源名称。Base class for task that determines the appropriate manifest resource name to assign to a given resx or other resource.

CreateProperty

只是输入到输出的直通传递。Just a straight pass-through of the inputs through to the outputs.

CreateTemporaryVCProject

创建一个临时的 Visual C ++ 项目,其中 MSBuild 引用替换为文件引用。Creates a temporary Visual C++ project with MSBuild references replaced with file references.

CreateVisualBasicManifestResourceName

任务的基类,用于确定要分配给给定 resx 或其他资源的相应清单资源名称。Base class for task that determines the appropriate manifest resource name to assign to a given resx or other resource.

Csc

实现 Csc 任务。Implements the Csc task. 使用项目文件中的 Csc 元素创建和执行此任务。Use the Csc element in your project file to create and execute this task. 有关用法和参数信息,请参阅 Csc 任务For usage and parameter information, see Csc Task.

Delete

删除磁盘中的文件。Delete files from disk.

DownloadFile

表示可下载文件的任务。Represents a task that can download a file.

Error

只发出错误的任务。Task that simply emits an error. 引擎将添加项目文件路径和行/列信息。Engine will add project file path and line/column information.

ErrorFromResources

在给定资源字符串的情况下发出错误的任务。Task that emits an error given a resource string. 引擎将添加项目文件路径和行/列信息。Engine will add project file path and line/column information.

Exec

此类定义一个“Exec”MSBuild 任务,该任务仅使用指定的参数调用指定的进程,等待其完成,然后如果成功完成该进程则返回 True,如果发生错误则返回 False。This class defines an "Exec" MSBuild task, which simply invokes the specified process with the specified arguments, waits for it to complete, and then returns True if the process completed successfully, and False if an error occurred.

FindAppConfigFile

在提供的列表中查找 app.config 文件(若有)。Finds the app.config file, if any, in the provided lists. 出于兼容性原因,它必须遵循特定的任意算法。For compat reasons, it has to follow a particular arbitrary algorithm. 它还将添加 TargetPath 元数据。It also adds the TargetPath metadata.

FindInList

在提供的列表中查找具有指定 itemspec(如果存在)的项的任务。A task that finds an item with the specified itemspec, if present, in the provided list.

FindInvalidProjectReferences

返回指向各种框架的引用程序集路径Returns the reference assembly paths to the various frameworks

FindUnderPath

在项列表中,确定哪些项位于传入的文件夹中,而哪些项不是。Given a list of items, determine which are in the cone of the folder passed in and which aren't.

FormatUrl

通过规范化 URL 来设置其格式(即“ ”->“%20”),然后将“localhost”转换为“machinename”。Formats a url by canonicalizing it (i.e. " " -> "%20") and transforming "localhost" to "machinename".

FormatVersion

通过将版本和再版组合来设置版本的格式。Formats a version by combining version and revision.

GenerateApplicationManifest

生成 ClickOnce 项目的应用程序清单。Generates an application manifest for ClickOnce projects.

GenerateBindingRedirects

采用推荐的重定向(来自 ResolveAssemblyReference 和 GenerateOutOfBandAssemblyTables 任务),并将其添加到 App.config 文件的中间副本。Take suggested redirects (from the ResolveAssemblyReference and GenerateOutOfBandAssemblyTables tasks) and add them to an intermediate copy of the App.config file.

GenerateBootstrapper

为 ClickOnce 部署项目生成引导程序。Generates a bootstrapper for ClickOnce deployment projects.

GenerateDeploymentManifest

生成 ClickOnce 项目的部署清单。Generates a deploy manifest for ClickOnce projects.

GenerateManifestBase

所有清单生成任务的基类。Base class for all manifest generation tasks.

GenerateResource

这个类定义了“GenerateResource”MSBuild 任务,该任务可以使用资源 API 来转换资源文件。This class defines the "GenerateResource" MSBuild task, which enables using resource APIs to transform resource files.

GenerateTrustInfo

此任务从基本清单以及 TargetZone 和 ExcludedPermissions 属性生成应用程序信任。This task generates the application trust from the base manifest and the TargetZone and ExcludedPermissions properties.

GetAssemblyIdentity

探查程序集标识的输入文件,并输出一组具有标识信息的项。Sniffs input files for their assembly identities, and outputs a set of items with the identity information.

GetFileHash

计算单个文件的校验和。Computes the checksum for a single file.

GetFrameworkPath

返回指向各种框架版本的路径。Returns the paths to the various frameworks versions.

GetFrameworkSdkPath

返回框架 SDK 的路径。Returns paths to the frameworks SDK.

GetInstalledSDKLocations

在注册表项中和磁盘上收集安装的 SDK 列表,把其输出到项目中,当 SDK 引用解析和 RAR 期间,就可以在单文件中使用它们。Gathers the list of installed SDKS in the registry and on disk and outputs them into the project so they can be used during SDK reference resolution and RAR for single files.

GetReferenceAssemblyPaths

返回指向各种框架的引用程序集路径Returns the reference assembly paths to the various frameworks

GetSDKReferenceFiles

将 SDKReference 解析为磁盘上的完整路径Resolves an SDKReference to a full path on disk

Hash

生成给定 ItemGroup 项的哈希。Generates a hash of a given ItemGroup items. 在哈希中不考虑元数据。Metadata is not considered in the hash. 目前使用 SHA1。Currently uses SHA1. 实现在 MSBuild 版本之间随时发生更改。Implementation subject to change between MSBuild versions. 不用作加密安全措施,只是在生成执行之间保持唯一。Not intended as a cryptographic security measure, only uniqueness between build executions.

LC

许可证编译器任务The License Compiler task

MakeDir

用于创建目录的任务A task that creates a directory

ManagedCompiler

定义托管编译器任务共有的属性和方法。Defines the properties and methods common to managed compiler tasks.

Message

只发出消息的任务。Task that simply emits a message. 如果未指定,则重要性默认为“高”。Importance defaults to high if not specified.

Move

要移动一个或多个文件的任务。Task to move one or more files.

MSBuild

实现 MSBuild 任务。Implements the MSBuild task. 使用项目文件中的 MSBuild 元素创建和执行此任务。Use the MSBuild element in your project file to create and execute this task. 有关用法和参数信息,请参阅 MSBuild 任务For usage and parameter information, see MSBuild Task.

ReadLinesFromFile

从文件读取项列表。Read a list of items from a file.

RegisterAssembly

为 COM 互操作注册一个托管程序集(等效于 regasm.exe 功能,但此代码实际上不会调用 exe)。Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code doesn't actually call the exe).

RemoveDir

删除指定的目录。Remove the specified directories.

RemoveDuplicates

在给定项列表的情况下,移除重复项。Given a list of items, remove duplicate items. 不考虑属性。Attributes are not considered. 不区分大小写。Case insensitive.

RequiresFramework35SP1Assembly

此任务决定此项目是否需要 VS2008 SP1 程序集。This task determines if this project requires VS2008 SP1 assembly.

ResolveAssemblyReference

在给定 assemblyFiles 列表的情况下,确定是否关闭所有符合后述特征的 assemblyFiles:依赖于那些还包含第二阶和第 n 阶依赖项的 assemblyFiles。Given a list of assemblyFiles, determine the closure of all assemblyFiles that depend on those assemblyFiles including second and nth-order dependencies too.

ResolveCodeAnalysisRuleSet

根据所提供的代码分析属性,确定要用作代码分析规则集的文件(如果有)。Determines which file, if any, to be used as the code analysis rule set based on the supplied code analysis properties.

ResolveComReference

适用于 .NET Core 的 COM 引用解析任务的主类Main class for the COM reference resolution task for .NET Core

ResolveKeySource

确定强名称密钥源Determine the strong name key source

ResolveManifestFiles

该任务将生成过程中的以下各项解析到用于清单生成的文件:生成的项、依赖项、附属项、内容、调试符号和文档。This task resolves the following items in the build process to files for manifest generation: built items, dependencies, satellites, content, debug symbols, and documentation) to files for manifest generation.

ResolveNativeReference

本机引用解析任务的主类。Main class for the native reference resolution task.

ResolveNonMSBuildProjectOutput

确定非 MSBuild 项目引用的输出文件。Determines the output files for non-MSBuild project references.

ResolveProjectBase

ResolveNonMSBuildProjectOutput 和 AssignProjectConfiguration 的基类,因为它们具有相似的体系结构Base class for ResolveNonMSBuildProjectOutput and AssignProjectConfiguration, since they have similar architecture

ResolveSDKReference

将 SDKReference 解析为磁盘上的完整路径Resolves an SDKReference to a full path on disk

ResolveVCProjectOutput

确定 Visual C++ 项目引用的输出文件。Determines the output files for Visual C++ project references.

RoslynCodeTaskFactory
SGen

为输入程序集生成包含 XML 序列化程序的序列化程序集。Genererates a serialization assembly containing XML serializers for the input assembly.

SignFile

此任务使用提供的验证码证书对传入的文件进行签名,如果提供了 URL,则可选择使用时间戳。This task signs the passed in file using the Authenticode cert provided and optionally uses a timestamp if a URL is provided. 它可以对 ClickOnce 清单以及 exe 清单进行签名。It can sign ClickOnce manifests as well as exe's.

TaskExtension

MSBuild 任务的小型中间类,另请参阅 TaskLoadInSeparateAppDomainExtensionA small intermediate class for MSBuild tasks, see also TaskLoadInSeparateAppDomainExtension

TaskLoggingHelperExtension

任务的帮助程序日志记录类,用于处理两个资源流。Helper logging class for tasks, used for dealing with two resource streams.

Telemetry

记录遥测数据的任务。Task that logs telemetry.

ToolTaskExtension

ToolTask 和类之间的小型中间类,在 XMakeTasks 中使用它,用于实现我们不想要在实用程序中公开的功能A small intermediate class between ToolTask and classes using it in XMakeTasks, implementing functionality that we didn't want to expose in Utilities

Touch

此类定义 touch 任务。This class defines the touch task.

UnregisterAssembly

为 COM 互操作注册一个托管程序集(等效于 regasm.exe 功能,但此代码实际上不会调用 exe)。Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this code doesn't actually call the exe).

Unzip

表示可以提取 .zip 存档的任务。Represents a task that can extract a .zip archive.

UpdateManifest

更新清单中所选的属性并重新签名。Updates selected properties in a manifest and resigns.

Vbc

实现 Vbc 任务。Implements the Vbc task. 使用项目文件中的 Vbc 元素创建和执行此任务。Use the Vbc element in your project file to create and execute this task. 有关用法和参数信息,请参阅 Vbc 任务For usage and parameter information, see Vbc Task.

VCBuild

实现 VCBuild 任务。Implements the VCBuild task. 使用项目文件中的 VCBuild 元素创建和执行此任务。Use the VCBuild element in your project file to create and execute this task.

VerifyFileHash

验证文件是否与预期的文件哈希匹配。Verifies that a file matches the expected file hash.

Warning

只发出警告的任务。Task that simply emits a warning. 由于未指定文件名,引擎将添加项目路径。Engine will add the project path because we do not specify a filename.

WinMDExp

将托管程序集导出到 windows 运行时的元数据。Exports a managed assembly to a windows runtime metadata.

WriteCodeFragment

生成一个临时代码文件,其中包含指定的生成代码片段。Generates a temporary code file with the specified generated code fragment. 不会删除该文件。Does not delete the file.

WriteLinesToFile

向文件追加项列表。Appends a list of items to a file. 每行有一个项,中间是回车。One item per line with carriage returns in-between.

XamlTaskFactory

XAML 任务的任务工厂提供程序。The task factory provider for XAML tasks.

XmlPeek

一个可从 XML 文件返回 XPath 查询指定的值的任务。A task that returns values as specified by XPath Query from an XML file.

XmlPoke

一个可将 XPath 查询指定的值设置到 XML 文件中的任务。A task that sets values as specified by XPath Query into a XML file.

XslTransformation

使用 XSLT 或编译的 XSLT 转换 XML 输入,并输出到屏幕或指定文件的任务。A task that transforms a XML input with an XSLT or Compiled XSLT and outputs to screen or specified file.

ZipDirectory

结构

ExtractedClassName

已从源文件中提取类名。Extracted class name from the source file.

接口

IFixedTypeInfo

CLR 中的原始 ITypeInfo 接口对 GetRefTypeOfImplType 和 GetRefTypeInfo 的定义不正确。The original ITypeInfo interface in the CLR has incorrect definitions for GetRefTypeOfImplType and GetRefTypeInfo. 它使用 int 来封送句柄,这将导致 64 位系统崩溃。It uses ints for marshalling handles which will result in a crash on 64 bit systems. 这是一个临时接口,可在 CLR 中的接口修复之前使用它。This is a temporary interface for use until the one in the CLR is fixed. 修复 ITypeInfo 后,我们可以重新使用它。When it is we can go back to using ITypeInfo.