We have a nightly build process that automatically versions all C++ projecs. Here's how it works. There's a common header file VersionNumber.h
that has a specific #define
for the version number. The nighly build checks this file out, increments the integer behind that #define
and checks it in. All Visual C++ projects #include
that header into their resource files and use that define for specifying the version (version is smth like 1.0.3.ThatNumber
).
So far so good. Now I'd like to have the same for the C# class libraries built in the same daily build. Currently they all have
[assembly: AssemblyVersion("1.0.*")]
in the AssemblyInfo.cs files and libraries end up with 1.0.HorribleNumber.AnotherHorribleNumber
as the version and the two numbers don't correlate to the number used by C++ projects.
How do I have the same determenistic automatic version numbering in my C# projects with minimal effort?