We all know that Debug.Assert
will not be compiled into the dlls when compiled in release mode. But for some reason Debug.Assert
did appea
Remember that "Release mode" is just a build configuration with a name of "Release". That doesn't necessarily imply anything about the compilation settings being used: it's perfectly possible to create a configuration called "Release" that actually compiles everything with debug settings. Or, in fact, doesn't compile anything at all!
The other answers suggest a few of the places to look - but basically it sounds like either your project or solution settings have reconfigured "Release" builds to include debug information.
On possibility not mentioned yet: in VS, if you drop down the build configuration combobox (where you normally select "Debug" or "Release") and select "Configuration Manager," you can see what each solution build configuration means for each of your projects. You'll note that you can, for example, configure a "Release" build on the solution to still build some components in Debug mode if you wanted to.