-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Developers can create scopes to support load/unload scenarios because AssemblyLoadContext is supported throughout .NET #43544
Comments
dotnet/aspnetcore#21159 is a related workitem. |
excited,thank you. |
@jeffschwMSFT this seems primarily runtime work. Is there a better epic to parent it under than the libraries one? |
I don't have a strong feeling about where it would parent. It was in the theme of developer experience and hence why it ended up here. At this point there is no specific ask but once the dev inner loop work is settled it could become more important. So it could either become bottoms up or parent under dev inner loop. |
@stephentoub when he's back can perhaps help clarify whether this is necessary for dev inner loop. |
I am loading the runtime and a managed assembly from native code using the hostfxr hosting interfaces. I find that my managed assembly is loaded into a new I want to suggest as part of this issue that the hostfxr gets some mechanism to make a collectible managed extension, loaded from the native host interfaces. (I am not trying to unload the runtime from the process, just my own native & managed libraries, for example to update and reload it.) Ideally, I want my (collectible) I'm not quite there yet, but I think I would also like a way to know (from the native hostfxr side) when the unload attempt is complete, and whether it was successful. Maybe some callback would work for this. Under the .NET Framework, such unloading works through the |
The assembly load context has been rather successful in solving a large set of customer problems. The most prominent one is the so called “plugin” model where the application (host) loads other components to augment its functionality in some way. Such components are typically loaded into separate load contexts to avoid dependency collisions. Additionally, in some apps it’s also desirable to be able to eventually unload such components either to free resources or to enable update of the component.
Producing such applications has proven rather challenging in the current state of .NET Core because there are certain parts of the frameworks produces by us which are not compatible with multiple load contexts and/or unload ability.
We should drive the frameworks we own to fix these issues so that customer’s code doesn’t have to handle issues in frameworks they rely on. We should focus this effort on certain application types first to prioritize the work. We’ve seen feedback on mainly ASP.NET and WPF applications. There might be overlap with the “faster inner loop” effort which would affect the prioritization as well.
The work can be split into two parts (and prioritized differently):
In both cases an important part of the work should be a general approach to testing – for example reuse existing test assets but run them under different conditions and providing customer guidance for first & third parties.
Work Items
The text was updated successfully, but these errors were encountered: