MSBuild.ExtensionPack.Framework Namespace

MSBuild Extension Pack

MSBuild.ExtensionPack.Framework Namespace MSBuild Extension Pack Help 4.0.12.0

Overview

This namespace hosts tasks that can be used to work with elements of the .net framework
Classes

  Class Description
Public class Code example Assembly
Valid TaskActions are:

GetInfo (Required: NetAssembly Output: OutputItems)

GetMethodInfo (Required: NetAssembly, NetClass, Output: OutputItems)

Invoke (Required: NetAssembly Optional: NetMethod, NetArgumentsOutput: ReturnValue)

Remote Execution Support: No

Public class Code example AssemblyInfo
The AssemblyInfo task provides a way to manipulate the content of AssemblyInfo files at build time. It works with C#, VB, and J# AssemblyInfo files.

This task is based on the AssemblyInfo task written by Neil Enns (http://code.msdn.microsoft.com/AssemblyInfoTaskvers). It is used here with permission.

Public class Code example AsyncExec
Asynchronously runs a specified program or command with no arguments. This is similar to the Exec Task: http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx.

This task is useful when you need to run a fire-and-forget command-line task during the build process.

Note that that is a fire and forget call. No errors are handled.

Public class Code example CommandLine
Launches command-line executables with robust warning and error message integration in MSBuild and Visual Studio. This is an expanded version of the Exec Task: http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx.
Public class Code example ConfigManager
Task used to work with the .NET framework web.config and machine config files Valid TaskActions are:

ProtectConfigSection (Required: Section Optional: Site, Path, ConfigurationFileType, ProtectionProvider, SaveMode)

RemoveAppSetting (Required: SettingName Optional: Site, Path, ConfigurationFileType, SaveMode)

RemoveConnectionString (Required: SettingName Optional: Site, Path, ConfigurationFileType, SaveMode)

SetAppSetting (Required: SettingName Optional: Site, Path, SettingValue, ConfigurationFileType, SaveMode)

SetConnectionString (Required: SettingName Optional: Site, Path, SettingValue, ConfigurationFileType, SaveMode)

UnprotectConfigSection (Required: Section Optional: Site, Path, ConfigurationFileType, SaveMode)

Public class Code example DateAndTime
Valid TaskActions are:

AddDays (Required: Format, Value Optional: Start Output: Result)

AddHours (Required: Format, Value Optional: Start Output: Result)

AddMilliseconds (Required: Format, Value Optional: Start Output: Result)

AddMinutes (Required: Format, Value Optional: Start Output: Result)

AddMonths (Required: Format, Value Optional: Start Output: Result)

AddSeconds (Required: Format, Value Optional: Start Output: Result)

AddTicks (Required: Format, Value Optional: Start Output: Result)

AddYears (Required: Format, Value Optional: Start Output: Result)

CheckBetween (Required: Start, End Optional: UseUtc Output: BoolResult)

CheckLater (Required: Start Optional: UseUtc Output: BoolResult)

Get (Required: Format Optional: UseUtc Output: Result)

GetElapsed (Required: Format, Start Optional: End, UseUtc Output: Result)

Remote Execution Support: NA

Public class Code example DynamicExecute
Valid TaskActions are:

Define (Required: Code Optional: Inputs, Outputs, References, UsingNamespaces, NoDefaultParameters, NoDefaultReferences, NoDefaultUsingNamespaces Output: OutputMethodId). Defines and compiles a new method, which can then be used to create a closure.

Create (Required: MethodId Output: OutputClosureId). Creates a new closure. All input and output arguments for this closure are set to their default values.

SetInput (Required: ClosureId, Name, InputValue). Sets an argument value for a closure.

Invoke (Required: ClosureId). Invokes a closure.

GetOutput (Required: ClosureId, Name Output: OutputValue). Retrieves a result value (output parameter value) from a closure.

Destroy (Required: ClosureId). Disposes of a closure. The closure ID is no longer valid after this task action.

Call (Required: MethodId Optional: Input1, Input2, Input3 Output: Output1, Output2, Output3). Calls a method with up to three inputs, returning up to three outputs. Internally, creates a closure, sets the input parameters, invokes it, retrieves the output parameters, and destroys it.

Run (Required: Code Optional: Inputs, Outputs, References, UsingNamespaces, NoDefaultParameters, NoDefaultReferences, NoDefaultUsingNamespaces, Input1, Input2, Input3 Output: Output1, Output2, Output3, OutputMethodId). Defines a method and runs it. The task outputs include the outputs from the method as well as the method identifier.

Remote Execution Support: None.

Public class Code example Gac
Valid TaskActions are:

AddAssembly (Required: AssemblyPath Optional: MachineName, RemoteAssemblyPath, UserName, UserPassword)

CheckExists (Required: AssemblyName Optional: MachineName)

RemoveAssembly (Required: AssemblyName Optional: MachineName, UserName, UserPassword)

Remote Execution Support: Partial (not for CheckExists)

Public class Code example GenericTool
This task can be used to wrap any executable
Public class Code example Guid
Valid TaskActions are:

Create (Output: GuidString, FormattedGuidString)

CreateCrypto (Output: GuidString, FormattedGuidString)

Remote Execution Support: NA

Public class Code example ILMerge
This task wraps ILMerge.

This has been tested using ILMerge v2.10.0526

Public class Code example Metadata
Please note that this can be accomplished using vanilla MSBuild. See MSBuild metadata discussion. Valid TaskActions are:

Add (Required: Items, NewMetadata Output: NewItems)

Remote Execution Support: NA

Public class Code example MSBuildHelper
Valid TaskActions are:

Escape (Required: InputString Output: OutputString)

FilterItems (Required: InputItems1, RegexPattern Optional: Metadata Output: OutputItems)

FilterItemsOnMetadata (Required: InputItems1, InputItems2, Metadata Optional: Separator Output: OutputItems)

GetCommonItems (Required: InputItems1, InputItems2 Output: OutputItems, ItemCount)

GetCurrentDirectory (Output: CurrentDirectory)

GetDistinctItems (Required: InputItems1, InputItems2 Output: OutputItems, ItemCount)

GetItem (Required: InputItems1, PositionOutput: OutputItems)

GetItemCount (Required: InputItems1 Output: ItemCount)

GetLastItem (Required: InputItems1Output: OutputItems)

ItemColToString (Required: InputItems1 Optional: Separator Output: OutputString)

RemoveDuplicateFiles (Required: InputItems1 Output: OutputItems, ItemCount)

Sort (Required: InputItems1Output: OutputItems)

StringToItemCol (Required: ItemString, Separator Output: OutputItems, ItemCount)

UpdateMetadata (Required: InputItems1, InputItems2 Output: OutputItems)

Remote Execution Support: NA

Public class Code example Parallel
Valid TaskActions are:

BuildTargetsInParallel (Required: Targets Optional: AdditionalProperties, ProjectFile, WaitAll, WorkingDirectory, MultiLog, MultiLogOpenOnFailure, MultiLogVerbosity, MultiLogResponseVerbosity, MultiProc, MaxCpuCount, NodeReuse)

BuildTargetSetsInParallel (Required: Targets Optional: AdditionalProperties, ProjectFile, WaitAll, WorkingDirectory, MultiLog, MultiLogOpenOnFailure, MultiLogVerbosity, MultiLogResponseVerbosity, MultiProc, MaxCpuCount, NodeReuse)

Remote Execution Support: NA

Public class Code example Path
Valid TaskActions are:

ChangeExtension (Required: Filepath, Extension Output: Value)

Combine (Required: Filepath, Filepath2 Output: Value)

GetDirectoryName (Required: Filepath Output: Value)

GetExtension (Required: Filepath Output: Value)

GetFileName (Required: Filepath Output: Value)

GetFileNameWithoutExtension (Required: Filepath Output: Value)

GetFullPath (Required: Filepath Output: Value)

GetPathRoot (Required: Filepath Output: Value)

GetRandomFileName (Output: Value)

GetTempPath (Output: Value)

HasExtension (Required: Filepath Output: Value)

IsPathRooted (Required: Filepath Output: Value)

Remote Execution Support: NA

Public class Code example Signing
Valid TaskActions are:

AddSkipVerification (Required: PublicKeyToken Optional: ToolPath)

RemoveAllSkipVerification (Optional: ToolPath)

Sign (Required: Assemblies, KeyFile Optional: ToolPath)

Remote Execution Support: NA

Public class Code example SmartExec
Runs a specified program or command without blocking the UI. This is similar to the Exec Task: http://msdn.microsoft.com/en-us/library/x8zx72cd.aspx.

This task is useful when you need to run a long command-line task during the build process.

Public class Code example TextString
Valid TaskActions are:

Compare (Required: String1, String2, Comparison Optional: IgnoreCase Output: Result)

EndsWith (Required: String1, String2 Optional: IgnoreCase Output: Result)

Format (Required: String1, Strings Output: NewString)

GetLength (Required: OldString Output: NewString)

Insert (Required: OldString, String1, StartIndex Output: NewString)

PadLeft (Required: OldString, String1 (1 char) Optional: Count Output: NewString)

PadRight (Required: OldString, String1 (1 char) Optional: Count Output: NewString)

Remove (Required: OldString, StartIndex Optional: Count Output: NewString)

Replace (Required: OldString, OldValue, NewValue Output: NewString)

Split (Required: String1, String2 Optional: StartIndex Output: Strings, NewString)

StartsWith (Required: String1, String2 Optional: IgnoreCase Output: Result)

Substring (Required: OldString Optional: StartIndex, Count Output: NewString)

ToLower (Required: OldString Output: NewString)

ToUpper (Required: OldString Output: NewString)

Trim (Required: OldString Output: NewString)

Remote Execution Support: NA

Public class Code example Thread
Valid TaskActions are:

Abort (Warning: use only in exceptional circumstances to force an abort)

Sleep (Required: Timeout)

SpinWait (Required: Iterations)

Remote Execution Support: NA

Public class Code example XProduct
This task creates a cross product of up to 10 ItemGroups

Remote Execution Support: NA

Enumerations

  Enumeration Description
Public enumeration DotNetConfigurationFile
Public enumeration IncrementMethod
Specifies how certain version numbers are incremented by the task.