Ich versuche, Plug-ins in meiner WPF-Anwendung zu aktivieren. Soweit mir bekannt ist, brauche ich (na ja, nicht nötig ., aber es wird empfohlen) eine zusätzliche Anwendungsdomäne erstellenApp-Domäne für die Verwendung mit Plugins erstellen: "Assembly eingeben ist nicht als serialisierbar markiert
Dafür ich in meinem App.xaml.cs folgende beim Start so mache:
private void LoadPlugins()
{
// Create and polish plugin app domain
AppDomain pluginAppDomain = AppDomain.CreateDomain("MyProject Plugin Container", null);
pluginAppDomain.UnhandledException += PluginAppDomain_UnhandledException;
//TODO: Load plugins from dlls
}
private void PluginAppDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Logger.FatalException("PluginAppDomain", e.ExceptionObject as Exception);
}
aber das UnhandledException Ereignis Befestigung schlägt mit Ausnahme :
Typ 'MyProject.App' in Assembly 'MyProject, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 1337' ist nicht als serialisierbar gekennzeichnet.
Was könnte das Problem sein?