Fervent Coder

Coding Towards Utopia...by Rob Reynolds
posts - 278 , comments - 431 , trackbacks - 0

My Links


Rob Reynolds

Subscribe to Fervent Coder RSS
Subscribe to Fervent Coder by Email

About Me

I manage several open source projects. Need...
   ...package management for Windows?
   ...automated builds?
   ...database change management (migrations)?
   ...your application to check email?
   ...a monitoring utility?

I also write for

Like what you are reading? Want to buy me a cup of coffee?
PayPal - The safer, easier way to pay online!


Post Categories


UppercuT - Automated Builds - VersionBuilder

UppercuT comes with VersionBuilder. A common problem many of us have is versioning our DLL assemblies and keeping track of what’s in production versus what’s in source control. If you rock with Subversion, UppercuT has this problem solved. So how do you take advantage of VersionBuilder?

UppercuT automatically generates an assembly version file for you during build. All you need to do is hook every project up to it.

Notice in the same directory the solution is in, after you run build.bat, there is a file named SolutionVersion.vb or SolutionVersion.cs.

Folder Structure pointing out SolutionVersion file

Hook It Up

1. In every project in Visual Studio, you will need to create a link to that file.

  Project Structure in Solution Explorer

2. Right click on the project in Solution Explorer, select {Add}->{Existing Item…}.

  Add Existing item...

3. Read the next two steps before you do this or you may do it incorrectly. We have to create a LINK to this file, not actually add it.

4. Locate the SolutionVersion file and click ONLY to select it. This file is generated to sit next to your Solution file.

    Finding SolutionVersion

5. On the right of {Add} there is a little drop down you can click. Click on it and select [Add As Link].

    Add as Link

6. The image should have a little arrow in it when it is added.

    link to SolutionVersion.cs

7. Now remember to add this to every code project that you can.

8. Build your project in Visual Studio. You should get quite a few build errors.

9. Open every AssemblyInfo.vb or AssemblyInfo.cs file you have in the project and delete out everything except for GUID (keep it). If you have added anything here besides what is standard (strong named assemblies, etc), you will want to keep those.

  assembly only has guid

10. Next time you run build.bat, you get a revision number in your DLL.

  Version shows

11. The next time CruiseControl.NET (or at some point, other CI servers) runs a build, you get the build number in the DLL file as well.

  Build server version shows

 With this knowledge you shall build.

kick it on DotNetKicks.com

Print | posted on Thursday, May 21, 2009 3:10 PM | Filed Under [ Code UppercuT ]


Comments are closed.
Comments have been closed on this topic.

Powered by: