WDK 7 Build Environment Problem

I have a well functioning Windows driver (WDM) that can be built using both WDK 6000 and WDK 7. When I build Free and Checked versions of that driver using WDK 6000 build environments, the size of the two binaries are different; which is normal. BUT when I build the same code in WDK 7 build environments I get the exact same binary sizes for both Free and Checked builds. I have also had reports that ASSERT statements seem to be executing in our Free Build version of the driver; which doesn’t make any sense. Does anybody know what is going on? Is there anything different in WDK7 build environments we should watch for?

Thanks!

It turned out to be related to the MSC_OPTIMIZATION option I use in the SOURCES file.
I had MSC_OPTIMIZATION=/OD in the file to disable all sorts of optimizations and it causes the compiler to generate the same size binaries for both Free and Checked Build environments.