In the app I created, when I close the app from the Window's close button, a System.InvalidOperationException exception occurs.
The problem occurs with the code below (I also pasted the stack trace when the problem occurred).
The exception occurs after "Application.Run(form);" ends (after exiting from the Main function). It's probably the same cause as https://github.com/dotnet/maui/issues/7277, but I don't know how to work around it with Winform.
I tried the code below, but the problem remains the same.
Description
I am developing a Blazor+Winform app according to the site below. https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/windows-forms?view=aspnetcore-8.0
In the app I created, when I close the app from the Window's close button, a System.InvalidOperationException exception occurs.
The problem occurs with the code below (I also pasted the stack trace when the problem occurred).
The exception occurs after "Application.Run(form);" ends (after exiting from the Main function). It's probably the same cause as https://github.com/dotnet/maui/issues/7277, but I don't know how to work around it with Winform.
I tried the code below, but the problem remains the same.
I am using .netsdk8.0.401
This problem occurs only occasionally.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
8.0.40 SR5
Affected platforms
Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response