Well, something stumped me. But figured it out … As part of my C# console application, I wanted to print out the version (Major.Minor.Revision) as part of the help output so I could know the release details. And without the Application object, I just wanted the simple information from the build assembly.
C# Code
Version vrs = Environment.Version;
Console.Write("Version: {0}.{1}.{2}"
, vrs.Major, vrs.Minor, vrs.Revision);
Nice. Hope that helps you too, cause it took a little bit to sift through a lot of “mud blog” to find it.
Filed under: C#, Programming



Environment.Version is the version of the .NET framework.
This did not help me.
you need something like this
Assembly assembly = Assembly.GetAssembly(Type.GetType(“Mynamespace.Program”));
Version vrs = assembly.GetName().Version;
this method gives you Framework version. not console applications version