the source file is different from when the module was built

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

    I got this issue running a console app where the source that was different was the source that had the entry-point (static void Main). Deleting the bin and obj directories and doing a full rebuild seemed to correct this, but every time I made a code change, it would go out-of-date again.

    The reason I found for this was:

    1. I had checked "Only build startup projects and dependencies on Run" (Tools -> Options -> Projects and Solutions -> Build and Run)
    2. In Configuration Manager, my start-up project didn't have "Build" checked

    (For #2 -> accessible via the toolbar under the 'Debug/Release' drop down list.)

提交回复
热议问题