title: How do I determine what version of Silverlight an assembly is compiled against?
body: <p>Given a assembly how do I determine (in code) what version of Silverlight that assembly is compiled against?</p>
  
  <p>So I want a method that does this</p>
  
  <pre><code>public static decimal GetSilverlightVersion(string assemblyPath)
  {
     Magic goes here
  }
  </code></pre>
  
  <p>and it should return 2.0, 3.0 or 4.0</p>
  
  <p>Note: the executing code is .net 4 not Silverlight</p>