Now I have a problem, I want to load the assembly dynamically depending on the platform (x86, ARM). I am creating a _M_ARM compilation conditional character to distinguish between x86 and ARM.
So I use System.Reflection.Assembly.LoadFrom (@ "MP3 / ARM / Mp3EncLib.dll") , but an exception is raised that Assembly.LoadFrom does not support on Windows Phone.
So I use another System.Reflection.Assembly.Load method (@ "MP3 / ARM / Mp3EncLib.dll") , but it throws an exception that
Additional information: Failed to load file or assembly 'MP3 / ARM / Mp3EncLib.dll, Culture = neutral, PublicKeyToken = null or one of its dependencies. The given assembly name or code base is invalid.
private void Application_Launching(object sender, LaunchingEventArgs e)
{
#if _M_ARM
System.Reflection.Assembly.Load(@"MP3/ARM/Mp3EncLib.dll");
#else
System.Reflection.Assembly.Load(@"MP3/X86/Mp3EncLib.dll");
#endif
}
This is my decision

Does anyone know how to use this method. Or the best way
source
share