the source file is different from when the module was built

后端 未结 27 2003
無奈伤痛
無奈伤痛 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:26

    I get this issue when debugging sometimes w/ Visual Studio but when the application is served by IIS. (we have to develop in this form for some complicated reasons that have to do with how the original developer setup this project.)

    When I change the file and rebuild, that fixes it a lot of the time. I know that sounds silly, but I was just trying to debug some code to see why it's doing something weird when I haven't changed it in a while, and I tried a dozen things from this page, but it was fixed just by changing the file..

    0 讨论(0)
  • 2020-11-29 21:27

    Some things for you to check:

    Have you double checked your project references?

    Do you have a Visual Studio started web server still running? Check the system tray and look for a page with a cog icon (you may have more than one):


    (source: msdn.com)

    Right click and close/exit it. You may have more than one. Can you debug your changes now?

    Are you running the debug version but have only built the release version (or vice versa)?

    Did the compile actually succeed? I know I've clicked through the "there were errors, do you want to continue anyway?" message a couple of times without realising.

    0 讨论(0)
  • 2020-11-29 21:27

    I had this problem, and it turns out I was running my console application as a windows application. Switching the output type back to console fixed the issue.

    0 讨论(0)
  • 2020-11-29 21:27

    In my case, the @Eliott's answer doesn't work. To solve this problem I had Exclude/Include From Project my deficient file, andalso Clean and Rebuild the solution.

    After these actions, my file with my last modifications and the debugger are restored.

    I hope this help.

    0 讨论(0)
  • 2020-11-29 21:28

    In Visual Studio 2017 deleting the hidden .vs folder in the resolved this issue for me.

    0 讨论(0)
  • 2020-11-29 21:29
    1. Delete all breakpoints.
    2. Rebuild.
    3. Done
    0 讨论(0)
提交回复
热议问题