title: Unable to call Assembly.GetName() from my Silverlight application
body: <p>I want to display my application version number within my application, and the simplest way to do this is to use the version number for the assembly.</p>
  
  <pre><code>var assembly = System.Reflection.Assembly.GetExecutingAssembly();
  var name = assembly.GetName();
  return String.Format("Version {0}.{1}", name.Version.Major, name.Version.Minor);
  </code></pre>
  
  <p>I can get the executing assembling without problem, but the call to <code>GetName()</code> returns a <code>MethodAccessException</code> with this message</p>
  
  <blockquote>
    <p>Attempt by security transparent method 'MainPage..ctor()' to access security critical method 'System.Reflection.Assembly.GetName()' failed.</p>
  </blockquote>
  
  <p>Why is this happening, is there anything I can do about it, and if not is there another means of retrieving the assembly version?</p>