I'm trying to check what framework version a other .NET application is working with through a assembly. I found two ways to get the version of the framework ( first through the ImageRunetimeVersion and with the FullName of the assembly ) but i'm getting two different values from it and i dont know which is the right one:
Assembly ass = Assembly.LoadFrom(autPath);
string imageRuntimeVersion = ass.ImageRuntimeVersion;
Console.WriteLine("ImageRunetimeVersion: " + imageRuntimeVersion);
Console.WriteLine("FullName: " + ass.FullName);
Console.WriteLine("");
Console.WriteLine("----");
Console.WriteLine("Referenced Assemblies: ");
Console.WriteLine("");
AssemblyName[] referencedAssemblies = ass.GetReferencedAssemblies();
foreach (AssemblyName a in referencedAssemblies)
{
Console.WriteLine(a.FullName);
}
if i'm going to test this with my application and of e.g paint.net the results are:
Like you can see i cant say which "version" is the right one. The biggest problem is that if i'm going to take a look to my project properties for my .net application the target platform is 3.5 and not 2.0 or 1.0-