Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I just upgraded my fairly large MFC application from VS2008 to VS2013. After some minor tweaks (specify /SAFESH:No, WINVER=0x0601) everything works except Edit and Continue, which worked brilliantly under VS2008. InVS2013, even if I just add a comment line, it recompiles, says "Done", and then throws out the following message:

Edit and Continue : error 1006 : A global or static variable was added, renamed, removed, or changed data type or initialization: ___ImageBase (referenced by: c:\temp\process\debug\jlglob.obj)

Clearly I have not changed a global variable. I have scoured the web and checked the following things, which have not helped:
- disabled all optimisation
- set "Program Database for Edit and Continue /ZI"
- not using Precompiled Headers
- /SAFESH:NO
- Platform Toolset - Visual Studio 2013 (v120)
- deleted all intermediate file directories, including .tlog files
- enable Native EnC, as in VS2008

Any ideas anyone? This is very frustrating!!
Posted
Comments
Richard MacCutchan 5-Jan-15 7:44am    
Have you tried the Microsoft forums?
drb01 5-Jan-15 8:59am    
No - have never used them. I should probably give that a go... thanks for the tip..
KarstenK 5-Jan-15 12:06pm    
Delete all database files in the solution dir in the Recycle bin.

I suggest that you use the stdafx.h!!!
drb01 5-Jan-15 14:03pm    
I completely deleted all the build directories (again) and emptied the recycle bin. There isn't a lot I can easily do with stdafx.h, and not sure why it should make a difference especially as I am not using precompiled headers (it's on the to do list!). Well, unfortunately it didn't make any difference...
KarstenK 7-Jan-15 7:43am    
in the stdafx.h belongs all Microsoft or fix stuff like math or constants.

The stdafx.h should be included in all source files in which you do EnC.

Do you link own libs in the app?

Problem seems to have been fixed in VS2015 Community edition.
 
Share this answer
 
I had absolutely the same issue. In my case I had found that I need to actually enable "Precompiled headers". After enabling the precompiled headers edit and continue started to work.
You'll need to set:
"Create" - for StdAfx.cpp
"Use" - for other cpp files
Just enabling precompiled headers to one particular file, in which I want to make changes during debug, made "Edit and Continue" work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900