Visual Studio: “Apply Code Changes” is disabled

2019-05-14 07:19发布

问题:

I am using Visual Studio 2005. When I debug my project, "Apply Code Changes" is disabled in the menu. At one time this worked on my project, but today doesn't. What settings should I check to allow this to work.

Things I have already checked:

I am in debug mode.
"Debug Information Format" is set to "Program Database for Edit & Continue."

回答1:

Finally found the setting I was missing:

In the project properties, go to Configuration Properties->Linker->General. Set "Enable Incremental Linking" to "Yes."

Hopefully this information can help someone else in the future.



回答2:

If it worked previously and suddenly stopped working (without project changes), it's most likely that your incremental link file is corrupt.

Try deleting your .ilk file.