-
-
Notifications
You must be signed in to change notification settings - Fork 232
More Events for Reloading #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I also have the problem that I can't kill the application via. CTRL+C if I use a host-in-host (same repo, just the host-in-host) branch. It block forever (not sure why, since everything is unloaded) |
Why do you need need to call .Stop() before the assembly is reloaded? Can you elaborate more on what problem you're encountering?
Can you confirm that this problem is the result of DotNetCorePlugins? It seems to me like this problem would occur in a 'vanilla' project that isn't doing dynamic loading. |
Actually I need to call stop to correctly close everything in the plugin, like database connections.
nope this happens with Both things are just features, i.e. more events that either help by debugging and it helps to have a clean shutdown before the plugin gets unloaded. Hope this feedback helps? |
Makes sense, but what problems are you having with the current API? The reason I'm asking is that I don't yet understand a compelling reason to add a new event API. An important thing to note about |
In terms of cleanup how about this:
A) Make sure you call Dispose() on any disposable instances loaded from that assy load context. This is easier if for example you have a DI container responsible for the lifetime of all those types, and then you can just Dispose() that container. |
cant do that without download full source code. anyway,i voted this. need an event to do release some resource for the plugin. |
u are right,i do own file watcher and call the Reload now. thanks for share your idea. |
@sgf you are welcome, I do have some good ideas occasionally, not as often as I'd like ;-) |
FYI - this project is in maintenance mode right now. I updated the labels on this issue. See #117 for detail on what the applied labels indicate. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please comment if you believe this should remain open, otherwise it will be closed in 14 days. Thank you for your contributions to this project. |
Closing due to inactivity. |
Hello, I'm trying to build a Plugin System on top of your awesome Library.
I currently have the following use cases:
while downloading, starting and stopping is actually working really nicely, reloading/upgrading has some caveheats.
currently I have uploaded a demo project at github here: https://github.com/schmitch/dotnet-plugin-demo
currently I need to have a Stop method called before reloading my plugin.
Unfortunatly I can only call it after the plugin got reloaded.
That is my log output:
How it should be:
Currently I think it would be possible by introducing an event that will be called, before
this._context.Unload();
is called. Maybe call itBeforeReload
(i.e.Reloaded
could also be deprecated in favor ofAfterReload
, then)?The text was updated successfully, but these errors were encountered: