We really like the new feature to be able to install/uninstall several plugins at once.
But the way it works now does not allow us to prevent certain plugins to be uninstalled.
Let me give you an example.
We have a Core plugin that contain common libraries shared by all our plugins.
In other words, we don't allow this plugin to be Uninstalled if there are any other SevenSpikes plugins already installed.
Unfortunately with the new functionality we have no way to prevent our customers of uninstalling the Core plugin by mistake and thus their website will not be able to be even started as there will be missing assemblies from the Core plugin.
We also have other plugins that are dependent on each other i.e Ajax Filters Pro require the Ajax Filters to be installed first as otherwise they will not work etc.
So it would be great if we could tell nopCommerce if certain plugins could not be installed/unistalled and return some message i.e "You could not uninstall Core plugin as it is used by other plugins" or "You could not install Ajax Filters Pro plugin as it required the Ajax Filters plugin to be installed first" etc.
Thank you in advance as usual!
To add to my previous post how we handled this in the previous version of nopCommerce.
In the Install method of all our plugins we had an additional check ShouldInstallPlugin which checks that if the Core plugin is not installed then it simply does not call the Install method of the BasePlugin (we always inherit the BasePlugin). This way, even without showing any messages to the clients, at least we didn't allow them to install a plugin that will potentially break the site.
In the Uninstall method of all our plugins we had an additional check ShouldUnInstallPlugin.
If we should not uninstall a plugin we simply don't call the Uninstall method of the BasePlugin and thus it was never really uninstalled.
Now in nopCommerce 4.20 the logic of the actual installation/uninstallation of the plugin is not in the plugin (as it used to be in the BasePlugin) itself and we have no control over it.
The bottom line is that we need a way to prevent certain plugins to be added in the list of plugins that are to be Uninstalled as once they go there and the application is restarted we could do nothing.
Can you please comment on the above post?
This is very important to be done before 4.20 is released as otherwise we will have a lot of angry customers.
Alternatively you could implement something like DependentPlugins option in the plugin.json file just like the SupportedVersions.
This way when you are about to Install a new plugin you can simply check if all of its DependentPlugins system names are either already installed or to be installed and if not then do not install that plugin.
What do you think?
We started doing some Linux testing and found out that you are using Bitmap and Image classes in FileRoxyFilemanService.cs.
Please note that System.Drawing is not supported on Linux (unless you do some sudo stuffs) and you better use some other library instead.
So now for example the file upload in the editor is not working on Linux (and a lot of other functionality from the editor too).
p.s: Just noticed that you already use ImageSharp so you can change the code to use it instead.