the source file is different from when the module was built

后端 未结 27 2218
無奈伤痛
無奈伤痛 2020-11-29 20:53

This is driving me crazy.

I have a rather large project that I am trying to modify. I noticed earlier that when I typed DbCommand, visual studio did

27条回答
  •  悲&欢浪女
    2020-11-29 21:12

    With web services, the problem can be caused by using the Visual Studio "View in Browser" command. This places the service's DLL and PDB files in the bin and obj folders. When stepping into the web service from a client, somehow Visual Studio uses the PDB in the bin (or obj) folder, but it uses the DLL in the project's output build folder. There are a couple workarounds:

    1. Try deleting the DLL and PDB files in the web service bin and obj files.
    2. Try clicking "View in Browser" in Visual Studio.

    If you previously got the source file mismatch error, Visual Studio might have added the filename to a black list. Check your solution properties. Choose "Common Properties -> Debug Source Files" on the left side of the dialog box. If your web service source files appear in the field "Do not look for these source files", delete them.

提交回复
热议问题