Created
December 21, 2012 21:12
-
-
Save gogsbread/4355877 to your computer and use it in GitHub Desktop.
Check if your library folder contains non-optimized (“DEBUG” build) external libraries.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
string[] pathNames = Directory.GetFiles(@"path\to\library\folder\"); | |
foreach (string path in pathNames) | |
{ | |
Assembly asm = Assembly.LoadFrom(path); | |
object[] attrs = asm.GetCustomAttributes(typeof(DebuggableAttribute), false); | |
Console.WriteLine("{0}:{1}", asm.FullName, (attrs.Length > 0) ? "Release" : "Debug"); | |
} | |
//NOTE: Though it is a possibility that we can emit debug symbols with optimization turned on, but this does not happen in most cases. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment