Reputation: 1233
I have created WPF application solution, added a third-party(cloned git repo locally on my machine) library(Class Library output type) project to the solution, added the library project to my solution:
And then referenced it in WPF Project settings:
When a library throws an exception, I get this in Visual Studio:
I can edit the library project, edit the WPF project, compile everything and it will work. But for whatever reason when an exception is thrown I can't debug the library. How do I fix this?
Upvotes: 1
Views: 1363
Reputation: 1233
I fixed Source Not Available error fix by unchecking Use Managed Compatibility Mode Checkbox(checked checkbox causes error to appear) in Tools-Options
, Debugging-General
:
If someone reads this and knows why Use Managed Compatibility Mode was checked and why I couldn't debug my library because of it, please tell us. It took me few hours of googling, asking people around, and trial and error, until I found out that it was my options(after I decided to reset them to see if it was them). I didn't change this checkbox by myself, I would have remembered it. It was like that from the start. I only export my options from older versions of Visual Studio(Visual Studio 2015 > 2017 > 2019) to preserve code style and other options I like.
Upvotes: 1