How to tell if Assembly is Debug or Release

By Peter Bromberg
Access over 40 UI widgets with everything from interactive menus to rich charts.

How to tell if an assembly was built in debug or release mode

private bool IsAssemblyDebugBuild(Assembly assembly)
{  
return assembly.GetCustomAttributes(false).Any(x =>(x as DebuggableAttribute)!=null?(x as DebuggableAttribute).IsJITTrackingEnabled:false);  
}

How to tell if Assembly is Debug or Release  (630 Views)