Simple question... is there a way to change the Assembly Version of a compiled .NET assembly?
I'd actually be fine with a way to change the Assembly File Version.
Simple question... is there a way to change the Assembly Version of a compiled .NET assembly?
I'd actually be fine with a way to change the Assembly File Version.
Why do you want to do this? If it's so that another application can use it, you might want to look into assembly binding redirection instead.
It sounds like your process is heavy because you have to update multiple AssemblyInfo files. Have you considered sharing the same AssemblyInfo file between projects? Derik Whittaker gives a good example on how to do this.
Once you have a single file, you could then go the extra distance by having a build process update your single AssemblyInfo version using MSBuild or NAnt.
We'd (also) like to be able to do this so that a release of our mixed-mode (client-server main app, web-based reporting) application uses the same "file version number" for a full-on release. Given that the c/s app & web app build as needed, they do not necessarily end up at the same version number when we're ready to release.
It'd be nice if I could take already QA'd assemblies & use a "touch"-like command to update the assembly attributes. At the moment, I have to rebuild the web app to update them. This always makes our support folks nervous.
You can use ilmerge ILMerge.exe" Foo.dll /ver:1.2.3.4 /out:Foo2.dll
A valid reason to do this is to increment the assembly version in a build in you find breaking changes (using NDepend for example). That way if there are no breaking changes the assembly version stays the same, and you can patch released builds easily.
We always increment the file version, and that reflects the build number.