I have a VS2008 project written in c# with a number of assemblies. I'd like to have a simple way of managing the version numbers between all of the different assemblies and a way to automatically increment the build number and have that saved into the version number of each assembly.
I'm guessing that this is a problem with most projects so presumably it has been solved before?
Any suggestions for how I can simplify management of my project's version resources?
The version number is stored in the assembly manifest along with other identity information, including the assembly name and public key, as well as information on relationships and identities of other assemblies connected with the application.
I can get the Assembly Version with the following line of code: Version version = Assembly.
You can either remove '*' from your version string, or disable determinism in your project file by setting the MSBuild property `<Deterministic>false</Deterministic>`.
I use a .cs file on solution level that is linked by all projects in the solution which contains the following lines:
using System.Reflection;
[assembly : AssemblyVersion("1.2.3.*")]
And be sure to remove the AssemblyFileVersion
attribute from the AssemblyInfo file in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With