John,
There's no <replace> task right now, but it could be a useful addition. Are you volunteering to tackle it ? ;-)
Gert
----- Original Message ----- From: "John Wadlow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 12, 2004 4:35 AM
Subject: [Nant-users] inplace use of filterchain
I want to use the filterchain to replace the assemblyInfo's version with my next version for each project in my solution before I build
I first thought I could use copy and just copy inplace with the following
<copy todir="." overwrite="true" verbose="true">
<fileset>
<include name="**/AssemblyInfo.cs" />
</fileset>
<filterchain>
<replacestring from="1.0.*" to="${NextVersion}" />
</filterchain>
</copy>
But that gave me the following output
[copy] Copying 3 files to 'C:\Common\Test\Tools\TestSolution'.
[copy] Skipping self-copy of 'C:\Common\Test\Tools\TestSolution\UI.Web\AssemblyInfo.cs'.
[copy] Skipping self-copy of 'C:\Common\Test\Tools\TestSolution\Class2\AssemblyInfo.cs'.
[copy] Skipping self-copy of 'C:\Common\Test\Tools\TestSolution\Class1\AssemblyInfo.cs'.
I ended up doing the following which worked.
<!-- update AssemblyInfo files -->
<copy todir="temp" overwrite="true" verbose="true">
<fileset>
<include name="**/AssemblyInfo.cs" />
</fileset>
<filterchain>
<replacestring from="1.0.*" to="${NextVersion}" />
</filterchain>
</copy>
<copy todir="..\TestSolution" overwrite="true" verbose="true">
<fileset basedir="temp">
<include name="**/AssemblyInfo.cs" />
</fileset>
</copy>
I'm wondering though, if there is any mechanism to apply filterchains to files without copying or moving them elsewhere?
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users