public void Unload() { IPluginEngine pluginEngine = container.Resolve <IPluginEngine>(); // unload plugins that are installed foreach (Plugin plugin in container.Resolve <IPluginService>().GetPlugins()) { PluginContainer pluginContainer = pluginEngine.GetPlugin(plugin); if (pluginContainer != null) { pluginContainer.Unload(); } } container.RegisterInstance(pluginEngine); }