Open tkouba opened 5 years ago
WPF version of SimpleAudioPlayer has wrong name of assembly. So on use throws FileNotFoundException with
FileName "Plugin.SimpleAudioPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" string
But dll name is "Plugin.SimpleAudioPlayer.WPF.dll"
Workaround:
public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolver); Xamarin.Forms.Forms.Init(); base.OnStartup(e); } private Assembly AssemblyResolver(object sender, ResolveEventArgs args) { if (args.Name.StartsWith("Plugin.SimpleAudioPlayer", StringComparison.CurrentCultureIgnoreCase)) { return Assembly.LoadFrom("Plugin.SimpleAudioPlayer.WPF.dll"); } return null; } }
WPF version of SimpleAudioPlayer has wrong name of assembly. So on use throws FileNotFoundException with
But dll name is "Plugin.SimpleAudioPlayer.WPF.dll"
Workaround: