Was that assembly built in Debug or Release?

Ted Graham posts about determing if an assembly is a debug assembly or a release assembly. His solution was to use the AssemblyDescription attribute:

#if DEBUG
[assembly: AssemblyDescription("Debug")] 
#else 
[assembly: AssemblyDescription("Release")] 

Others have posted comments on different, perhaps better ways, of doing this. The problem I have with using the AssemblyDescription attribute is that if you plan on doing anything with COM interop, the value of AssemblyDescription is used as the "helpstring" (i.e. Description) of the COM typelibrary generated by REGASM (or TLBEXP). In Ted's example above, the description for your assembly in the VB6 References dialog would be either "Debug" or "Release" -- not too descriptive.

No Comments