I upgraded my WPF project from .NET5 to .NET6. When I try to run the project it gives Unable to attach to CoreCLR. Operation not supported
But, I am able to run Without Debugging.
I tried to clean and update Nuget Packages to .NET6. Also, removed the obj and bin folders. These didn't solve the problem.
How can I re-enable Debugging? Thanks.
You have to change .NET5 <PublishSingleFile>true</PublishSingleFile> to setting below:
<PublishSingleFile Condition="'$(Configuration)' == 'Release'">true</PublishSingleFile>
After this change, you'll able to run with Debugging.
This issue mentioned and solved on these topics. You may check the details.