<!--
  Sample project file demonstrating the use of the AddMetadata task.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Demo">
	<UsingTask AssemblyFile="$(MSBuildExtensionsPath)\Sedodream\Sedodream.MSBuild.Tasks.dll" TaskName="AddMetadata"/>

	<ItemGroup>
		<Files Include="Tester\**\*">
			<Present>yes</Present>
		</Files>
	</ItemGroup>

	<Target Name="Demo">
    
		<Message Text="Files: @(Files,'%0d%0a')"/>
        
		<AddMetadata Items="@(Files)" Metadata="First=Sayed;Middle=Ibrahim;Last=Hashimi">
			<!-- No way to change the existing item, only to make a new one. -->
			<Output ItemName="NewFiles" TaskParameter="ResultItems"/>
		</AddMetadata>

		<Message Text="Test values:%0d%0a   @(NewFiles->'%(First) %(Middle) %(Last)','%0d%0a   ')"/>
		<Message Text="Test values: @(NewFiles->'%(RecursiveDir)')"/>
	</Target>

</Project>

Last edited Jun 26, 2007 at 4:19 AM by sayed_hashimi, version 1

Comments

No comments yet.