var plugins = Activator.CreateInstance(types.First()) as IPluginFinder;
This code stops with error in nopcommerce 4.10, These are that, In the previous version had no problem (4.00)
Full code:
var types = typeFinder.FindClassesOfType<IPluginFinder>();
if (types.Count() == 1)
{
var plugins = Activator.CreateInstance(types.First()) as IPluginFinder;
var currentPlugin = plugins.GetPluginDescriptorBySystemName("misc.myplugin");
if (currentPlugin == null || currentPlugin.Installed == false)
return;
}
Error: No parameterless constructor defined for this object