Assembly versioning and incremental updates

J

Joe

Hi All!

I'm working on putting together our build process and incremental updates. I
understand the way AssemblyVersion works but I'm not too clear as to how I
can do incremental updates to the application.

For example: MyApplication.exe uses MyDllA.dll, MyDllB.dll and MyDllC.dll.
All their versions are written to the manifest for MyApplication.exe. What
happens if I need to fix a bug in MyDLLB.dll? Isn't the entire solution
rebuilt with a different version now?
I would ideally like to deploy just this assembly to the clients but I don't
think that will be the case because the AssemblyVersion will change and will
no longer match the version in the manifest of the exe.

How can I deploy just the assemblies that needed to be fixed?

I'm also looking for an Auto build application which is tuned toward .NET. I
would like something that can do the obvious like get the source from the
source control application but in addition, change or modify the
AssemblyInfo.cs file to set the AssemblyVersion, AssemblyCompany and the
other attributes used in the AssemblyInfo.cs file

Thanks,
Joe
 
B

Brian Patterson

When you update an assembly - as long as you don't change any signatures,
you shouldn't have to rebuild the entire application and thus only deploy
the changed assembly. I typically leave the version number of the file the
same (AssemblyVersionAttribute) and instead only increment the the
informational version (AssemblyInformationalVersionAttribute).

When it comes to building it - I use CruiseControl .NET to build my
application whenever I check something into version control. CruiseControl
recognizes the changes to source control and then it launches NAnt (for VS
2003 Projects) or MSBuild for VS 2005 projects. NAnt has the built in
ability to auto-generate AssemblyInfo files and manipulate the version
information (as well as check the file back in to source control). To the
best of my knowledge - MSBuild can't do this but it wouldn't take much to
write your own class and extend MSBuild to do so. If you want a more
"Visual" way to perform builds you can use MegaBuild but again - it doesn't
have the ability to generate/alter AssemblyInfo files so you would need to
create something that MegaBuild could launch. I would recommend sticking
with NAnt.

Brian Patterson
http://dotnet.redeyepos.com
http://brian.redeyepos.com
 
N

Nick Hounsome

Joe said:
Hi All!

I'm working on putting together our build process and incremental updates.
I understand the way AssemblyVersion works but I'm not too clear as to how
I can do incremental updates to the application.

For example: MyApplication.exe uses MyDllA.dll, MyDllB.dll and MyDllC.dll.
All their versions are written to the manifest for MyApplication.exe. What
happens if I need to fix a bug in MyDLLB.dll? Isn't the entire solution
rebuilt with a different version now?
I would ideally like to deploy just this assembly to the clients but I
don't think that will be the case because the AssemblyVersion will change
and will no longer match the version in the manifest of the exe.

Version numbers only matter for signed assemblies in the GAC because this
allows you to run two versions side by side.

Version numbers of local assemblies don't matter as they are just assumed to
be what you wanted - different versions would be in different directory
trees.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top