tafkab76
tafkab76

Reputation: 475

Visual Studio keeps asking for the location of a source file while debugging?

In my c#-project I use the HtmlAgilityPack. Everything worked fine for weeks, but today, when I run the code in Debug Mode and code related to the HtmlAgilityPack is used, VS keeps asking me for the location of "HtmlNode.cs" which is a class within the HtlmAgilityPack.dll. When I choose "Cancel", VS crashes.

I don´t even have any breakpoints set. I cleaned and rebuilt the solution, deleted obj and bin folders, renamed "HtmlAgilityPack.pdb", deleted the temp-folder in the %APPDATA%-directory and also deleted and re-set the link to the assembly. Nothing worked.

Does anybody know what to do?

Upvotes: 0

Views: 3267

Answers (3)

ABS
ABS

Reputation: 122

I had a similar problem on VS C++ project. I deleted all the breakpoints and it worked for me: Debug -> Delete All Breakpoints (or use shortcut: Ctrl + Shift + F9).

Upvotes: 1

kota sathish kumar
kota sathish kumar

Reputation: 11

To fix this issue you have to enable below under In Debug >> Options >> Debugging/General

  • (Show disassembly if source is not available) under Enable address-level debugging.

Upvotes: 1

tafkab76
tafkab76

Reputation: 475

I still have no solution on how to avoid VS trying to debug into the source file, but thanks to Ron, I figured out, that an exception in the source file was the cause for the problem and so I changed my code accordingly, so that any Exception would be avoided. (In may case, I tried to remove an Attribute in an HtmlNode which wasn´t there.)

Upvotes: 0

Related Questions