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

將合理的「連結」中繼資料指派給所提供項目的工作。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

可接受 CodeDom 所支援語言並從中建立工作的工作 FactoryA 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

MSBuild 工作特有特殊化邏輯的 CommandLineBuilder 衍生類別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

建立使用檔案參考取代 MSBuild 參考的暫時 Visual C++ 專案。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 TaskFor 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

透過將其規範化 (即 " " -> "%20") 並將 "localhost" 轉換成 "machinename" 來格式化 URL。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

傳回 Framework 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 Interop (相當於 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

提供 assemblyFile 清單,判斷相依於清單上 assemblyFile 的所有 assemblyFile 關閉,包括第二及第 N 項相依性。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 核心的 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

這項工作會使用所提供的 Authenticode 憑證簽署傳入的檔案,且會在有提供 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

這個類別會定義觸碰工作。This class defines the touch task.

UnregisterAssembly

註冊受控組件以用於 COM Interop (相當於 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

將 Managed 組件匯出至 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 工作的工作 Factory 提供者。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.