I would like to print out my package version, including the resolved $(GitVersion) macro, in my result listener files.
I want the version info to be as accurate as possible, whether I’m running an installed package, or from locally built source code. The version seen in the Package Manager doesn’t get updated during local debug builds, so I’d rather not parse the version from there.
My idea is to use a pre-build event to generate the version string, probably by calling OpenTAP’s PackageDefExt.FromInputXml, or maybe GitVersionCalulator (neither of which are currently public). I would save that version string to an embedded resource text file, which can then be read at runtime.
Thoughts anyone? Has this been tackled already?