views:

212

answers:

3

Where I can change compiler options for C# project in VisualStudio 2008 (without command prompt). I need it to turn off optimization to compare optimized IL-code and unoptimized IL-code.

+3  A: 

[Right Click the Project] -> Properties -> Build -> Optimize Code

John Gietzen
+2  A: 

Project Properties => Build => Uncheck Optimize code

Moayad Mardini
A: 

And just as info: If you run in the debugger you will always get completely unoptimized execution. Regardless of the settings.

Foxfire
That is not true. If you optimize, some lines may not execute, such as unused local variables and etc...
John Gietzen