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

后端 未结 12 3011
名媛妹妹
名媛妹妹 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:37

    This can happen when you are debugging a .cshtml file with the same name as another file in the project. The debugger picks one of the files as the correct match (seemingly at random), so it will often find a mismatch when it compares the file from the Temporary ASP.NET Files to the source code in your project. The solution in my case was to rename one or both of the files from Standard.cshtml to something more specific.

提交回复
热议问题