Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I Like to compile only in debug. Right now I have compiled in Debug but not in Release and when pressing F11 on a certain line I get this message:

The source code file is different since the module was generated. Do you want the debugger to use it anyway?

What I have tried:

in all the sites of internet.
in all the sites of internet.
Posted
Updated 12-Sep-19 2:52am
v2

The message is quite clear - your debug information is out of step with your code.
Clean your solution and do a full rebuild and the problem should go away
 
Share this answer
 
F11 is "Step into" in Visual studio debugger - so if you get different results with the release and debug version then the chances are that you have different binaries for an assembly you are stepping into in the bin/debug and bin/release folder (or at least, different modification / creation dates)
Check them all manually, and see what you can find out.
 
Share this answer
 
Comments
[no name] 12-Sep-19 8:56am    
The problem is that I don't want to compile all the time in Debug and Release. I just want to compile in Debug, but when pressing F11, when the line changes the .cs file, that error appears.
F-ES Sitecore 12-Sep-19 9:07am    
You don't have to compile in release, just debug, and if you change the code then you have to stop debugging and re-compile
[no name] 12-Sep-19 9:40am    
I have the .cs in a dll called common.dll
The message says that the dll in \bin\debug\common.dll has changed since the code was generated (compiled only in debug)
OriginalGriff 12-Sep-19 9:58am    
Yes - check the file timestamps.
If they are later than the EXE (or DLL you are targeting) then the system want's to know why...
[no name] 13-Sep-19 7:39am    
I have verified that:
If I compile the dll in debug, the dll time in \ bin \ debug is updated well. If I compile Release the dll time is updated well in \ bin \ release

If I modify and compile in debug, but not in Release, I get the error message indicated. But now I have seen that if I compile in Release, but not in debug, I can execute and stop the execution as if it were Debug and continue with F11 and the error does not appear.

It seems that something has been changed internally that makes it recognize Release as Debug and vice versa.
Any solution?

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