Skip to content
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

AssemblyLoadContext unloading fails when custom usercontrol instance is created in plugin #84292

Closed
wwjwm opened this issue Apr 4, 2023 · 1 comment

Comments

@wwjwm
Copy link

wwjwm commented Apr 4, 2023

Example is copied from https://github.com/dotnet/samples/tree/main/core/tutorials/Unloading.
The Host project and Plugin project in the example are recreated as WPF application and WPF library respectively.
The PluginClass class is modified as following and the unloading issue is as shown in the code snippet.

public class PluginClass : Interface
{
    //......

    public string GetMessage()
    {
        //new UserControl();               -------------->Uncomment this line, unloading success

        //new CustomUserControl();  --------------->Uncomment this line, unloading fails

        return "Hello from the unloadable plugin";
    }

    //......
}

public class CustomUserControl : UserControl
{
}
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 4, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Apr 4, 2023
@vitek-karas
Copy link
Member

See dotnet/wpf#1764 - this is basically a known problem with WPF.

Closing as the problem is in WPF, not in runtime.

@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Apr 4, 2023
@jeffhandley jeffhandley added area-AssemblyLoader-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 6, 2023
@ghost ghost locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants