public void RemovePlugin() { using (var pluginManager = new PluginManager(_pluginsDirectory)) { var task = pluginManager.DeployPluginAsync(_pluginAssemblyPath); task.Wait(); var pluginDescriptor = pluginManager.Plugins.FirstOrDefault(); var pluginId = pluginDescriptor.Plugin.Id; pluginManager.RemovePluginAsync(pluginId).Wait(); Assert.IsFalse(File.Exists(Path.Combine(_pluginsDirectory, "Plugin.Xml.dll"))); } }