c# /optimize compiler option (VS2012)

309 views Asked by At

If an assembly is built with /optimize- (that's a dash/minus sign at the end) passed to Csc.exe does it get optimized or not?

What's the difference between the following three options:

/optimize
/optimize+
/optimize-

I don't find the MSDN article too helpful..

http://msdn.microsoft.com/en-us/library/t0hfscdc

1

There are 1 answers

0
Servy On BEST ANSWER

That is the way of explicitly saying that optimizations are off. It's just the same as omitting the parameter entirely. The option exists so that you can make it clear to the reader (perhaps in a batch script) that you intentionally don't want the optimizations, rather than having a reader think you simply forgot to add the parameter.