msbuild - Best build process solution to manage build versions -


i run rather complex project several independent applications. these use couple of shared components. have source tree looking below.

  • my project
    • application a
    • shared1
    • shared2
    • application b
    • application c

all applications have own msbuild script builds project , shared resources needs. run these builds on cruisecontrol controlled continuous integration build server.

when applications deployed deployed on several servers distribute load. means it’s extremely important keep track of build/revision deployed on each of different servers (we need have current version in dll version, example “1.0.0.68”).

it’s equally important able recreate revision/build been built able roll if didn’t work out intended (o yes, happends ...). today we’re using sourcesafe source control possible change if present reasons (ss it’s working ok so far).

another principle try follow it’s code been build , tested integration server deploy further.

"crusiecontrol build labels" solution

we had several ideas on solving above. first have continuous integration server build , locally deploy project , test (it now). know successful build in cruisecontrol generates build label , guess somehow use set dll version of our executables (so build label 35 create dll “1.0.0.35” )? idea use build label label complete source tree. check out label , recreate build later on.

the reason labeling complete tree include not actual application code (that’s in 1 place in source tree) shared items (that’s in different places in tree). successful build of “application a” label whole tree label “applicationa35” example.

there might issue when trying recreate build , setting dll version before deploying don’t have access cruisecontrol generated build label anymore. if crusiecontrol build labels unique projects use number labeling that’s not case (both application , b @ same time on build 35) have include application name in label. hence sourcesafe label “application35”. how can recreate build 34 , set 1.0.0.34 dll version numbers once built build 35?

"revision number" solution

someone told me subversion example creates revision number entire source tree on every check in – is case? has sourcesafe similar? if correct idea grab revision number when getting latest , build on cruisecontrol server. revision number used set dll version number (to example “1.0.0.5678”). guess specific revision subversion if needed , include application , shared items able recreate specific version past. would work , achived using sourcesafe?

summarize

so 2 main requirements are:

  1. be able track build/revision number of build , deployed dll.
  2. be able rebuild past revision/build, set old build/revision number on executables of build (to comply requirement 1).

so how solve this? preferred approach , how solve (or have totally different idea?)? **pleased give detailed answers. **

bonus question difference between revision number , build number , when 1 need both?

your scheme sound , achievable in vss (although suggest consider alternative, vss outdated product).

for "ci" build - versioning take @ msbuild community tasks project has "version" tasks. typically have "version.txt" in source tree , msbuild task increment "release" number while developers control major.minor.release.revision numbers (that's how client of mine wanted it). can use revision if prefer.

you have "fileupdate" tasks edit assemblyinfo.cs file version, , exe's , "dll's" have desired version.

finally vsslabel task label files appropriately.

for "rebuild" build - modify "get" files label, not execute "version" task (as selecting version build) , fileupdate tasks use version number.

bonus question:

these "how want use them" - use build number for, build number, i'd increment. if using ci you'll have many builds - vast majority no intention of ever deploying anywhere.

the major , minor self evident - revision i've used "hotfix" indicator. intend have "1.3" release - in reality product 1.3.1234.0 version. while working on 1.4 - find bug - , need hot fix 1.3.2400.1. when 1.4 ready - 1.4.3500.0


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -