How to differ between Silverlight v2.0 and v3.0 builds

I can see assemblies compiled with Silverlight SDK v2.0 and also v3.0 as link v2.0.5.0 from mscorlib.dll, system.dll, etc.

How can I tell if assembly X is v2.0 / v3.0?

+2


source to share


2 answers


I would recommend avoiding implementing any type of "quirks-mode" for controls or applications based on the Silverlight version ... this can be a maintenance nightmare.

What happens when Silverlight 4 comes out, for example? What if the next version fixes some behavior customized for the Silverlight 3 issue?



It is correct that all Silverlight 2 and 3 assemblies have [AssemblyVersion (2.0.5.0)], making it difficult to execute: - (.

To try and answer: you can use public reflection to explore UIElement. Get a UIElement and look for something that was added in Silverlight 3, such as mouse wheel support MouseWheel event on UIElement. Again, I wouldn't recommend it, but you could do it.

+3


source


If you add this DLL to visual studio, you can right click it and the runtime version will tell you.

You can also write a program to download and view. such as..



    // now get an external assembly
    AssemblyName anm = AssemblyName.GetAssemblyName( 
     "c:\\winnt\\microsoft.net\\framework\\v1.0.3705\\mscorlib.dll");
    // and show its version
    Console.WriteLine(anm.Version.ToString());

      

0


source







All Articles