How do I get the version of an assembly without loading it?

I found the following in this article. using System.Reflection; using System.IO; … // Get current and updated assemblies AssemblyName currentAssemblyName = AssemblyName.GetAssemblyName(currentAssemblyPath); AssemblyName updatedAssemblyName = AssemblyName.GetAssemblyName(updatedAssemblyPath); // Compare both versions if (updatedAssemblyName.Version.CompareTo(currentAssemblyName.Version) <= 0) { // There’s nothing to update return; } // Update older version File.Copy(updatedAssemblyPath, currentAssemblyPath, true);

How do the .NET Framework, CLR and Visual Studio version numbers relate to each other?

Visual Studio CLR .NET Framework —————————————————————————————- Visual Studio .NET (Ranier) 1.0.3705 1.0 Visual Studio 2003 (Everett) 1.1.4322 1.1 Visual Studio 2005 (Whidbey) 2.0.50727 2.0 Visual Studio 2005 with .NET 3.0 Extensions 2.0.50727 2.0, 3.0 Visual Studio 2008 (Orcas) 2.0.50727 2.0 SP1, 3.0 SP1, 3.5 Visual Studio 2008 SP1 2.0.50727 2.0 SP2, 3.0 SP2, 3.5 SP1 … Read more