-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Enhancement Allow unload AssemblyLoadContext which contains Avalonia content #13935 #13974
Enhancement Allow unload AssemblyLoadContext which contains Avalonia content #13935 #13974
Conversation
@dotnet-policy-service agree |
You can test this PR using the following package version. |
Usage Unloading += (sender) =>
{
AvaloniaPropertyRegistry.Instance.UnregisterByModule(sender.Assemblies.First().DefinedTypes);
}; |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
cc @kekekeks |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
@MakesYT since IAssetsLoader is a public API, and it's not possible to add interface method to a public API without breaking ABI, these changes are considered a breaking change. But it should be a pretty minor one, that we can accept. Can you run |
You can test this PR using the following package version. |
@maxkatz6 now it's ok |
…content #13935 (#13974) * Try fix #13935 * Fix * Fix * add sample * Fix * try load Style by reflection * try * Fixed an error when registering properties when uninstalling assemblies * Allowed to delete the IAssemblyDescriptorResolver StandardAssetLoader _assemblyNameCache * Resolving merge conflicts * Fix * Add exegesis * optimize * fix * Resolving merge conflicts * nuke
What does the pull request do?
Allows AssemblyLoadContext that contains Avalonia content to be unloaded
What is the current behavior?
Allowed AssemblyLoadContext that contains Avalonia content to be unloaded
Allowed you to uninstall Avalonia property registration on a specific type
Allowed to delete the IAssemblyDescriptorResolver StandardAssetLoader _assemblyNameCache
What is the updated/expected behavior with this PR?
Usage
Add the following methods to the AssemblyLoadContext Unloading event
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
None
Obsoletions / Deprecations
Added the RemoveAssembly method in IAssetLoader
@grokys @kekekeks & @danwalmsley
Fixed issues