c# - How to link software versions to tortoise svn revisions -
i'm developing c# .net application in visual studio i'm version controlling tortoise svn.
my question this: there way can link assembly version of main project eg:
[assembly: assemblyversion("2.2.3.4")]
to revision number in tortoise svn.
in such way can check out revision 2.2.3.4 directly instead of checking out eg. revision 52 (or whatever revision equals version 2.2.3.4).
that make easier me when i'm trying specific version of program don't have figure out svn revision number equals software version number i'm looking for.
thanks
add version.cs.tpl
file project content this:
namespace versioning { public static class versioninfo { public const string version = "2.2.3.$wcrev$"; } }
add pre-build event project:
subwcrev.exe "$(solutiondir)\" "$(projectdir)version.cs.tpl" "$(projectdir)version.cs" -f
build project. version.cs
created in project's folder, add project. may modify assemplyinfo.cs this:
[assembly: assemblyversion(versioning.versioninfo.version)]
subwcrev.exe
tool in tortoise program folder (http://tortoisesvn.net/docs/release/tortoisesvn_en/tsvn-subwcrev.html). should accessible (e.g. set in path variable). each time revision of project changes, reflected in version of assembly after build.
seems applicable post: linking tortoise svn revision number assembly version
Comments
Post a Comment