I have the following line of code in .NET 4.5 that I am trying to build as Portable Class Library. It\'s purpose is to get assembly version:
this.GetType().A
You are targeting a Silverlight-based platform (Silverlight 4 or higher, Windows Phone before version 8). Those platforms didnt' support the GetName() method. For those platforms, you can define an extension method like this:
public static class AssemblyExtensions
{
public static AssemblyName GetName(this Assembly assembly)
{
return new AssemblyName(assembly.FullName);
}
}