How to check if an assembly was built using Debug or Release configuration?

Check this. The idea is that you get the list of assembly attributes using Assembly.GetCustomAttributes() and search for DebuggableAttribute and then find if such attribute has IsJITTrackingEnabled property set. public bool IsAssemblyDebugBuild(Assembly assembly) { return assembly.GetCustomAttributes(false).OfType<DebuggableAttribute>().Any(da => da.IsJITTrackingEnabled); }

Common reasons for bugs in release version not present in debug mode

Many times, in debug mode in C++ all variables are null initialized, whereas the same does not happen in release mode unless explicitly stated. Check for any debug macros and uninitialized variables Does your program uses threading, then optimization can also cause some issues in release mode. Also check for all exceptions, for example not … Read more