Skip to content

Commit 104dd86

Browse files
Fixed version getting to work on other platforms.
1 parent 3586a39 commit 104dd86

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ConvertApi.Cli/Program.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ static async Task ConvertFiles(string apiToken, string fromFormat, string toForm
184184

185185
static string GetVersion()
186186
{
187-
var version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
188-
return version ?? "unknown";
187+
var version = Assembly.GetExecutingAssembly()
188+
.GetName()
189+
.Version?
190+
.ToString() ?? "unknown";
191+
192+
return version;
189193
}
190194
}

0 commit comments

Comments
 (0)