Cannot debug anymore Dapr Actors in Visual Studio 2022 targeting framework net6.0
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
What version of Dapr?
Dapr Actors 1.5.0
Expected Behavior
To be able to debug step by step when attaching the code to a process.
Actual Behavior
Since we are targeting the net6.0 framework, it is no more possible to debug the code in Visual Studio 2022.
Some error messages appears in the output console
'DaprActorService.exe' (CoreCLR: clrhost): Failed to load metadata for 'DaprActorContract.ICustomActor_.actorV1.disp', possibly because the process is corrupt.
'DaprActorService.exe' (CoreCLR: clrhost): Failed to load metadata for 'DaprActorContract.ICustomActor_.actorV1.mt', possibly because the process is corrupt.
We get this when a breakpoint is hitting.

When clicking "Continue execution" the Actor doesn't crash, it is just not possible to debug step by step.
It is working when targeting the net5.0 framework.
Steps to Reproduce the Problem
In self-hosted mode,
launch Actor with the following command :
pwsh.exe -Command "cd ..\src\DaprActorService; dapr run --app-id actor1 --app-port 5001 --dapr-http-port 55001 dotnet run"
attach to process in visualstudio 2022
add a breakpoint
invoke the actor through the actor proxy
Contributor guide
Assessment
This issue has not been assessed yet.