Skip to content

Commit

Permalink
Print various versions assigned to console's assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Mokrzycki committed Apr 8, 2022
1 parent 5b64d03 commit 1aa41d1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
// See https://aka.ms/new-console-template for more information
using System.Diagnostics;
using System.Reflection;

Console.WriteLine("Hello, World!");
var executingAssembly = Assembly.GetExecutingAssembly();
var assemblyName = executingAssembly.GetName();
var fileVersionInfo = FileVersionInfo.GetVersionInfo(executingAssembly.Location);

Console.WriteLine("Hello, World from version:");
Console.WriteLine(" assembly : " + assemblyName.Version);
Console.WriteLine(" file : " + fileVersionInfo.FileVersion);
Console.WriteLine(" informational : " + fileVersionInfo.ProductVersion);

0 comments on commit 1aa41d1

Please sign in to comment.