Unable to call Assembly.GetName() from my Silverlight application
问题 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. var assembly = System.Reflection.Assembly.GetExecutingAssembly(); var name = assembly.GetName(); return String.Format("Version {0}.{1}", name.Version.Major, name.Version.Minor); I can get the executing assembling without problem, but the call to GetName() returns a MethodAccessException with this message Attempt by security transparent method