“The breakpoint will not currently be hit. No symbols have been loaded for this document.” Fix

I got hit by this warning upon Debug-> Attach To Process. No matter what I did the breakpoints would not be hit. Then I figured out the issue. In my case, the problem happened because Visual Studio 2017 was not able to guess the correct version of .NET Framework used in the assembly. It was applying a default v4.5, v4.6 framework whereas my project was configured to use v3.5 (yes, its an old legacy LOB project). I fixed it by manually specifying the framework used like so:

Was like this (bad):

You see that highlighted part?. Hit on select and manually specify the framework like so(since mine was using v3.5 of .NET framework, I selected this. Your case might be different. So select accordingly):

Finally, it should look like this (since mine was using v3.5 of .NET framework, I selected this. Your case might be different. So select accordingly in previous step):

Then Hit Attach.

And viola, the error will be gone and breakpoints will be hot again.

 




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *