Title: Message
I have written Nant CustomTask to update the Assembly version automatically.
We have a process for automated build, which uses this task and increments the assembly version for the project.
The assembly version can be incremented for Major, Minor, incremental builds.
 
My build file looks like this:
 <target name="build" depends="clean">
  <call target="prepare"/>
  <csc target="library" warninglevel="4" output="${build.dir}/MyProject.dll" debug="${debug}">
   <sources>
    <includes name="**/*.cs" />
   </sources>
   <resources>
    <includes name="**/*.resx" />
   </resources>
   <references>
    <includes name="..\log4net\${build.dir}\log4net.dll" />
   </references>
  </csc>
  <echo message="****** My Project BUILD SUCCESSFUL ***********" />
 </target>
 <target name="prepare" if="${clean}">
         <loadtasks assembly="..\Nant\CustomTasks\bin\Release\CustomTasks.dll" />
         <updtasminfo asmname="MyProject.dll" xmlfile="AssemblyInfo.xml" sourcefile="AssemblyInfo.cs" majorrel="false" minorrel="false" incrementalbuild="true"/>
 </target>
AssemblyInfo.xml is the file, which stores the current assembly version and gets updated in each build.
If you like the idea, I can send you the Custom Task.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Archer
Sent: Tuesday, April 06, 2004 10:49 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Versioning the Assembly

Ok,

 

Here’s the kicker. I am using the Version task to create my build number. Now, how do I update the version numbers of the assemblies to match? I assume checking out the AssemblyInfo.cs files which I can do, updating them (not so sure about) and checking them back in.

 

If anyone can point me to something that demos this I would be great full?

 

Thanks,

Bob

 

 

 

Reply via email to