At my place, we use an AssemblyInfo-Custom.template which contains the
common attributs, like the company' name and copyrights. That file is
keep in a template/ directory and it is shared with all the projects
of a solution. The standard AssemblyInfo.cs is cleaned to only
contains the attributs specific to the project, like its name. The
file also contains the version's attributs, but they have MACRO
instead of version X.Y.Z.W.

The macros are replaced with the help of an script called from the pre-
build event. The script copies the template from the template/
directory to the properties's project directory and replace the macros
with a version generated with the help of "git describe". You can
search for GIT-VERSION-GEN for an example how to use "git describe" to
have a version string. The generated AssemblyInfo-Custom.cs is not

On Aug 19, 4:10 am, Ido Ran <> wrote:
> Hi,
> I'm using git to manage my .NET solution which contain 4 C# projects.
> .NET assemblies have version of schema
> I manage the major and minor manually.
> I would like to hook git into my help by increasing the build number
> of each project that is part of this commit.
> I think I can use git hooks (pre-commit) to run an MSBuild task that
> will change the version of the assembly or any other command line to
> change the version of the assembly.
> I would like to know if anyone does something like this?
> Thank you,
> Ido

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to