I have a .NET solution X that targets .NET framework net7.0. In X I reference (import) a self-created NuGet package that uses dlls from another solution - Y that targets multiple .NET frameworks: net472 and netstandard2.0.
My main issue is that when I debug X I cannot set breakpoints on the assemblies coming from Y.
When I open the processes window in Visual Studio (Debug -> Windows -> Processes) in X, I see a debugger for the following version of .NET: Managed (.NET Core, .NET 5+). When I open the same window when debugging Y, the debugger is configured to debug Managed (.NET 4.x). This Microsoft guide explains that this might be the root cause of my problem. However, I don't know how to add / change the debugger version used in X and also worry that if I change it to match Y's version I will no longer be able to debug code in X.
Things that I've tried so far, which did not work:
- Manually copied over relevant .pdb files to the Debug folder of X
- Added a symbol file location in settings - it contains the dlls and pdb files that are used to create the NuGet package
- Turned off "Just my code" option in settings
- As suggested here, started X without debugging and attached to it from another VS instance - as my debugger I chose: Managed (.NET Core, .NET 5+) and later Managed (.NET 4.x) but neither setup worked