This project contains custom MSBuild tasks developed by XComponent team.
The following example shows a project file invoking the ReplaceInFiles task:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="XComponent.MSBuild.Tasks.ReplaceInFiles"
AssemblyFile="XComponent.MSBuild.Tasks.dll"/>
<Target Name="MyTarget">
<ItemGroup>
<FileToModify>
<FullPath>.\TestA.txt</FullPath>
</FileToModify>
<FileToModify>
<FullPath>.\TestB.txt</FullPath>
</FileToModify>
</ItemGroup>
<ReplaceInFiles
Files="@(FileToModify)"
Regex="[a]"
ReplacementText="b"/>
</Target>
</Project>
ReplaceInFiles task replaces a pattern described as a Regex by the string provided in ReplacementText.
So the example replaces 'a' caracters with 'b' caracters in TestA.txt and TestB.txt files.
Apache License V2