Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. Version version = Assembly.GetEntryAssembly().GetName().Version;
  2.  
  3. System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
  4. FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
  5. string version = fvi.FileVersion;
  6.  
  7. string assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
  8. string assemblyVersion = Assembly.LoadFile('your assembly file').GetName().Version.ToString();
  9. string fileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
  10. string productVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion;
  11.  
  12. versionlabel.Text = "Version " + Application.ProductVersion;
  13.  
  14. AssemblyName.Version
  15.  
  16. ((AssemblyFileVersionAttribute)Attribute.GetCustomAttribute(
  17. Assembly.GetExecutingAssembly(),
  18. typeof(AssemblyFileVersionAttribute), false)
  19. ).Version;
  20.  
  21. new Version(System.Windows.Forms.Application.ProductVersion);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement