Alex Zaitsev
Alex Zaitsev

Reputation: 2766

How can I view a file version of Native AOT C# application in linux?

I have a C# console application compiled to Native AOT.

The code below works well when running on Windows, and it displays correct file version:

var versionInfo = FileVersionInfo.GetVersionInfo(exePath);
string version = versionInfo.FileVersion;

But in Linux (Ubuntu using Docker) version variable returns null;

Is it possible to view the file version in Linux? Note, that version check code is running from another application. I also noticed that FileVersionInfo.GetVersionInfo in Linux works well for .dll files, but Native AOT application contains only exe.

The native AOT application is compiled for Windows.

Upvotes: 1

Views: 158

Answers (0)

Related Questions