Skip to content

Commit bb795f5

Browse files
authored
Merge pull request #266 from Microsoft/version
Correct version lookup for ES autoincremented value
2 parents e5aa14e + 2791753 commit bb795f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/ColorTool/ColorTool/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ static void OutputUsage()
123123

124124
static void Version()
125125
{
126-
string exePath = System.Reflection.Assembly.GetEntryAssembly().Location;
127-
Version ver = AssemblyName.GetAssemblyName(exePath).Version;
128-
Console.WriteLine("colortool v" + ver);
126+
var assembly = System.Reflection.Assembly.GetExecutingAssembly();
127+
var info = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
128+
Console.WriteLine($"colortool v{info.FileVersion}");
129129
}
130130

131131
static void PrintTable()

0 commit comments

Comments
 (0)