问题
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.
回答1:
[Right Click the Project] -> Properties -> Build -> Optimize Code
回答2:
Project Properties => Build => Uncheck Optimize code
回答3:
And just as info: If you run in the debugger you will always get completely unoptimized execution. Regardless of the settings.
来源:https://stackoverflow.com/questions/1579590/compiler-options-for-c-sharp-project