Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I've just started doing some dev work on a WPF/Prism project under VS2008 on 64 bit Windows 7.

I've got these lines in my App.xaml file:
#if (DEBUG)
  RunInDebugMode();
#else
  RunInReleaseMode();
#endif


For some reason its started to always run in release mode despite building in debug mode when hitting F5 in VS2008. How can this be fixed?

Cheers,
Posted
Updated 27-Nov-10 8:48am
v2
Comments
Henry Minute 27-Nov-10 15:39pm    
Are you sure that all projects are being (re)built prior to running?
Jammer 30-Nov-10 4:46am    
Yeah, they're definitely being built prior to running the debug.

Quote: "That hasn't fixed it unfortunately. Thanks"

OK, Please show us your compilation preprocessor values, it's impossible to make any guesses based on the information provided.
 
Share this answer
 
Comments
Jammer 8-Dec-10 17:32pm    
OK, now I feel like a right noob! Sorry, about the shoddy response. Where would I find these values in VS?
Another thing to check: if you go to menu item Build > Configuration Manager... and select Debug in the Active solution configuration: drop down, you should be able to see whether any of your projects (listed below it) are set to build as Release while in the Debug configuration.
 
Share this answer
 
Quote: OK, now I feel like a right noob! Sorry, about the shoddy response. Where would I find these values.

Right click on your project then select:
Properties -> C/C++ -> Preprocessor

or
Properties -> C/C++ -> Command Line


Take a look and check that your settings are all consistent with the values you are using in your source code. It is time well spent to explore all the sections of the Properties dialog and the various options that are available.
 
Share this answer
 
Comments
Jammer 9-Dec-10 14:13pm    
Hi Richard,

I've never seen anything in the Project properties that mentions either command line or PreProcessor. What tab do you see these on in VS?

The only place I've seen "C/C++" is in the Tools => Options area ...

Cheers,
Jammer wrote: I've never seen anything in the Project properties that mentions either command line or PreProcessor. What tab do you see these on in VS?

The only place I've seen "C/C++" is in the Tools => Options area ...


Select your project in Solution Explorer and click on Properties, or right click on the project and select Properties; it is all in the Properties dialog.
 
Share this answer
 
The correct proprocessor value is _DEBUG as shown in the properties of your project.
 
Share this answer
 
Comments
Jammer 30-Nov-10 15:22pm    
That hasn't fixed it unfortunately. Thanks,

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