public GlobalContext() { stats = null; contextName = String.Empty; version = VersionInfo.appVersion; buildDateShort = VersionInfo.buildDate; versionLong = VersionInfo.longVersion; }
public GlobalContext() { stats = null; contextName = String.Empty; version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // A command is added to the pre-build events that generates BuildDate resource: // echo %date% %time% > "$(ProjectDir)\Resources\BuildDate.txt" buildDate = Properties.Resources.BuildDate.Trim(); // A command is added to the pre-build events that generates last commit resource: // git rev-parse HEAD > "$(ProjectDir)\Resources\GitCommit.txt" gitCommit = Properties.Resources.GitCommit.Trim(); }