Home > Net >  How to use c # programming for external application version information
How to use c # programming for external application version information

Time:09-23

I sent on disk C I release project installation package, want to use C # code to obtain the installation package deployment version number

CodePudding user response:


As shown in the package!

CodePudding user response:

Product version (version is not the Assembly, the Assembly version to use reflection) can use the FileVersionInfo ,
The static void Main (string [] args)
{
Var fi=FileVersionInfo. GetVersionInfo (Path.Com bine (Environment) SystemDirectory, "Notepad. Exe"));
Console. WriteLine (" Win32 product version: "+ fi. ProductVersion);
}

CodePudding user response:


I've just tried your method to get fi.. ProductVersion value, 12.0.21005.1 built by: REL, not as a result, I want to is on the drawing version number ~

CodePudding user response:

You want your software version number or other software version number?
If it is your own
My. Application. Info. Version. Major
My. Application. Info. Version. Minor
My. Application. Info. Version. Build
The
If it is other software # 2 building

CodePudding user response:

It is other installation package version number, want the kind of the version number, is my screenshot # 2 on the way to obtain the result is not my figure version number, but 12.0.21005.1 built by: REL, and this information, so the feeling is not right
  •  Tags:  
  • C#
  • Related