“The breakpoint will not currently be hit. A copy of file was found in dll file, but the current source code is different”

后端 未结 12 2943
名媛妹妹
名媛妹妹 2021-02-19 13:06

I keep getting this error saying there\'s a copy of the .cs file hence the break point will not get hit.

I have tried cleaning solution, rebuilding , deleting the .pdb

12条回答
  •  梦如初夏
    2021-02-19 13:55

    This happens to a debugging project when you try copying successfully built project from root(project's root) folder and saving the copy of same in "Project" folder of your respective Visual Studio.

    When you do the above step, Visual Studio debugging location sometimes keep referencing to the built DLLs in the copy/back-up folder.

    The same can be changed BY ONE OF THE METHODS written here.

    But if you are using Visual Studio's built-in IIS-EXPRESS, then you need to navigate to project properties "Properties|alt+enter" => "Web" => In Servers Section, select IIS Express => For current Project URL, click "Create Virtual Directory".

    This will warn you that the current Project Url is referred by some other Project Location(Your Copy|back-up Folder), Confirm your selection for the dialog box, and there you are, as HITTING your breakpoints again.

提交回复
热议问题