Metadata Class | MSBuild Extension Pack Help 4.0.12.0 |
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
Inheritance Hierarchy
MSBuild.ExtensionPackBaseTask
MSBuild.ExtensionPack.FrameworkMetadata
Namespace: MSBuild.ExtensionPack.Framework
Assembly: MSBuild.ExtensionPack (in MSBuild.ExtensionPack.dll) Version: 4.0.0.0
The Metadata type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Metadata |
Properties
Name | Description | |
---|---|---|
Items |
Sets the source Items.
| |
NewMetadata |
Sets the string which contains the metadata. This should be in the format n1=v1;n2=v2;... | |
ResultItems |
Gets the item which contains the result.
|
Examples
<Project xmlns="http:///schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Demo"> <PropertyGroup> <TPath>$(MSBuildProjectDirectory)\..\MSBuild.ExtensionPack.tasks</TPath> <TPath Condition="Exists('$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks')">$(MSBuildProjectDirectory)\..\..\Common\MSBuild.ExtensionPack.tasks</TPath> </PropertyGroup> <Import Project="$(TPath)"/> <ItemGroup> <Server Include="dev01;dev02;dev03"> <DbServer>dev-db01</DbServer> </Server> </ItemGroup> <Target Name="Demo"> <MSBuild.ExtensionPack.Framework.Metadata TaskAction="Add" Items="@(Server)" NewMetadata="Source=server01;Dest=server02"> <!-- No way to change the existing item, only to make a new one. --> <Output ItemName="Server2" TaskParameter="ResultItems"/> </MSBuild.ExtensionPack.Framework.Metadata> <Message Text="Result:%0d%0a@(Server2->'%(Identity)=Source: %(Source) Dest: %(Dest) DbServer: %(DbServer)','%0d%0a')"/> </Target> </Project>
See Also