Hi, I would like to ask you about your experiences about putting git metadata to dll and nuget packages. I found several solutions:


https://github.com/dasMulli/SimpleGitVersion
https://github.com/GitTools/GitVersion
https://www.nuget.org/packages/GitInfo/
https://github.com/MarkPflug/MSBuildGitHash
What I want is to have strong “stupid agnostic” solution that could help me identifying source codes and version from which was created dlls/nugets.
I am also playing with idea to “force” stable versioning only from master branch because CI is still WIP for all this stuff and some developers are not much disciplined in creation of nugets/dlls and this could prevent them from old manners and mistakes (version created from some “custom” branch that was “forgotten” to push to remote etc..) It could be something like like this.
So, how are you putting git metadata into dlls and how are you working with it? And how are you working with versioning of nugets and git? Are you using GitTools for it or something else?
Definitely GitVersion, and it’s made super easy as a nuget package, just add it to your library project and it works.
Link to the nuget task -> https://gitversion.net/docs/usage/msbuild-task
Just setting the informational version to the build number in my ci cd system.
C# devs
null reference exceptions

source