Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

Microsoft.Build.Tasks Namespace

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.

Contains the implementation of all tasks shipping with MSBuild. For information, seeMSBuild.

Classes

AddToWin32Manifest

Generates an application manifest or adds an entry to the existing one when PreferNativeArm64 property is true.

AL

This class defines the "AL" XMake task, which enables using al.exe to linkmodules and resource files into assemblies.

AppDomainIsolatedTaskExtension

This class provides the same functionality as the Task class, but derives from MarshalByRefObject so that it can beinstantiated in its own app domain.

AspNetCompiler

The AspNetCompiler task, which is a wrapper around aspnet_compiler.exe

AssignCulture

Class: AssignCulture

This task takes a list of resource file names and sets an attribute thatcontains the culture name embedded in the file name:

 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']

This is because embedded resources are referred to this way.

There are plenty of corner cases with this task. See the unit test formore details.

AssignLinkMetadata

Task to assign a reasonable "Link" metadata to the provided items.

AssignProjectConfiguration

Assigns XML project configurations to project reference task items.

AssignTargetPath

Create a new list of items that have <TargetPath> attributes if none was present inthe input.

CallTarget

Implements theCallTarget task. Use theCallTarget element in your project file to create and execute this task. For usage and parameter information, see CallTarget Task.

CodeTaskFactory

A task factory which can take code dom supported languages and create a task out of it

CombinePath

Task to call Path.Combine.

CombineTargetFrameworkInfoProperties

Combines items that represent properties and values into an XML representation.

CombineXmlElements

Combines multiple XML elements

CommandLineBuilderExtension

CommandLineBuilder derived class for specialized logic specific to MSBuild tasks

ConvertToAbsolutePath

Task to call Path.GetFullPath

Copy

A task that copies files.

CreateCSharpManifestResourceName

Base class for task that determines the appropriate manifest resource name toassign to a given resx or other resource.

CreateItem

Forward a list of items from input to output. This allows dynamic item lists.

CreateManifestResourceName

Base class for task that determines the appropriate manifest resource name toassign to a given resx or other resource.

CreateProperty

Just a straight pass-through of the inputs through to the outputs.

CreateTemporaryVCProject

Creates a temporary Visual C++ project with MSBuild references replaced with file references.

CreateVisualBasicManifestResourceName

Base class for task that determines the appropriate manifest resource name toassign to a given resx or other resource.

Csc

Implements theCsc task. Use theCsc element in your project file to create and execute this task. 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/columninformation.

ErrorFromResources

Task that emits an error given a resource string. Engine will add project file path and line/columninformation.

Exec

This class defines an "Exec" MSBuild task, which simply invokes the specified process with the specified arguments, waitsfor it to complete, and then returns True if the process completed successfully, and False if an error occurred.

FindAppConfigFile

Finds the app.config file, if any, in the provided lists.For compat reasons, it has to follow a particular arbitrary algorithm.It also adds the TargetPath metadata.

FindInList

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

Formats a url by canonicalizing it (i.e. " " -> "%20") and transforming "localhost" to "machinename".

FormatVersion

Formats a version by combining version and revision.

GenerateApplicationManifest

Generates an application manifest for ClickOnce projects.

GenerateBindingRedirects

Take suggested redirects (from the ResolveAssemblyReference and GenerateOutOfBandAssemblyTables tasks)and add them to an intermediate copy of the App.config file.

GenerateBootstrapper

Generates a bootstrapper for ClickOnce deployment projects.

GenerateDeploymentManifest

Generates a deploy manifest for ClickOnce projects.

GenerateLauncher

Generates a bootstrapper for ClickOnce deployment projects.

GenerateManifestBase

Base class for all manifest generation tasks.

GenerateResource

This class defines the "GenerateResource" MSBuild task, which enables using resource APIsto transform resource files.

GenerateTrustInfo

This task generates the application trust from the base manifestand the TargetZone and ExcludedPermissions properties.

GetAssembliesMetadata

Resolves metadata for the specified set of assemblies.

GetAssemblyIdentity

Sniffs input files for their assembly identities, and outputs a set of items with the identity information.

GetCompatiblePlatform

Performs SetPlatform negotiation for all project references when optedin via the EnableDynamicPlatformResolution property.

See ProjectReference-Protocol.md for details.

GetFileHash

Computes the checksum for a single file.

GetFrameworkPath

Returns the paths to the various frameworks versions.

GetFrameworkSdkPath

Returns paths to the frameworks SDK.

GetInstalledSDKLocations

Gathers the list of installed SDKS in the registry and on disk and outputs them into the projectso they can be used during SDK reference resolution and RAR for single files.

GetReferenceAssemblyPaths

Returns the reference assembly paths to the various frameworks

GetSDKReferenceFiles

Resolves an SDKReference to a full path on disk

Hash

Generates a hash of a given ItemGroup items. Metadata is not considered in the hash.

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

Implements theMSBuild task. Use theMSBuild element in your project file to create and execute this task. For usage and parameter information, see MSBuild Task.

MSBuildInternalMessage

Represents a task that produces localized messages based on the specified resource name.This task is intended to be called from internal targets only.

ReadLinesFromFile

Read a list of items from a file.

RegisterAssembly

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

This task determines if this project requires VS2008 SP1 assembly.

ResolveAssemblyReference

Given a list of assemblyFiles, determine the closure of all assemblyFiles thatdepend 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 basedon the supplied code analysis properties.

ResolveComReference

Main class for the COM reference resolution task for .NET Core

ResolveKeySource

Determine the strong name key source

ResolveManifestFiles

This task resolves items in the build process (built, dependencies, satellites,content, debug symbols, documentation, etc.) to files for manifest generation.

ResolveNativeReference

Main class for the native reference resolution task.

ResolveNonMSBuildProjectOutput

Determines the output files for non-MSBuild project references.

ResolveProjectBase

Base class for ResolveNonMSBuildProjectOutput and AssignProjectConfiguration, since they havesimilar architecture

ResolveSDKReference

Resolves an SDKReference to a full path on disk

ResolveVCProjectOutput

Determines the output files for Visual C++ project references.

RoslynCodeTaskFactory
SetRidAgnosticValueForProjects
SGen

Genererates a serialization assembly containing XML serializers for the input assembly.

SignFile

This task signs the passed in file using the Authenticode certprovided and optionally uses a timestamp if a URL is provided.It can sign ClickOnce manifests as well as exe's.

TaskExtension

A small intermediate class for MSBuild tasks, see also TaskLoadInSeparateAppDomainExtension

TaskLoggingHelperExtension

Helper logging class for tasks, used for dealing with two resource streams.

TaskRequiresFramework
Telemetry

Task that logs telemetry.

ToolTaskExtension

A small intermediate class between ToolTask and classes using it in XMakeTasks, implementing functionalitythat we didn't want to expose in Utilities

Touch

This class defines the touch task.

UnregisterAssembly

Registers a managed assembly for COM interop (equivalent of regasm.exe functionality, but this codedoesn't actually call the exe).

Unzip

Represents a task that can extract a .zip archive.

UpdateManifest

Updates selected properties in a manifest and resigns.

Vbc

Implements theVbc task. Use theVbc element in your project file to create and execute this task. For usage and parameter information, see Vbc Task.

VCBuild

Implements theVCBuild task. Use theVCBuild 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 becausewe do not specify a filename.

WinMDExp

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

The task factory provider for XAML tasks.

XmlPeek

A task that returns values as specified by XPath Queryfrom an XML file.

XmlPoke

A task that sets values as specified by XPath Queryinto a XML file.

XslTransformation

A task that transforms a XML input with an XSLT or Compiled XSLTand outputs to screen or specified file.

ZipDirectory

Structs

ExtractedClassName

Extracted class name from the source file.

Interfaces

IFixedTypeInfo

The original ITypeInfo interface in the CLR has incorrect definitions for GetRefTypeOfImplType and GetRefTypeInfo.It uses ints for marshalling handles which will result in a crash on 64 bit systems. This is a temporary interfacefor use until the one in the CLR is fixed. When it is we can go back to using ITypeInfo.

IUnregisterAssemblyTaskContract

In this article