Per the MSDN documentation: you can't use the
/O Options (Optimize Code).
If you want to use optimizations, turn off the
(or turn off optimizations of your want run time checks).
Or to avoid it all, create separate build configurations that have the
separate flags as needed (like a debug and release build).