TL;DR: Hosting via Windows Service might cause issue atm with StopApplication (IApplicationLifetime) and maybe we could open the discussion about incorporating dynamic loading/unloading of modules and their dependencies which might be in the works for .NET Core 3.0.
As per my previous reply regarding the Bad Gateway 502. I should have looked at the code. So the app domain is gracefully shut down, thus, there's nothing there for the reverse proxy. Poof. Bad Gateway in this case, unless I'm missing something else.
Perhaps not an issue while running as a console app on Windows, if GrandNode is running as a service there might be current complications with gracefully shutting down the app (StopApplication) as per: https://github.com/aspnet/Hosting/issues/1463
I suppose my question is, why is an application shutdown the adopted approach for uninstalling/installing/refreshing plugins? Perhaps a current limitation or the easiest approach and I am a fan of simple solutions. However, figured I would bring up a few things to keep in mind for future reference regarding dynamic loading/unloading of modules and their dependencies.
If you add new plugin and want to reload list of it, application has to stop and start again. In the other case, you won't see new plugins on the list. By the time we found a solution, which will be effective and fine, users need to refresh page manually.