"Brad" <br********@newsgroup.nospam> wrote in message
news:E3**********************************@microsof t.com...
My company is setting up a deployment process for implementing .NET
Windows applications. One of the standards we want the process to enforce is
verifying that the assembly is built in release mode. Is there a way to
check an assembly to determine if it was built in release mode? The
deployment application will not have access to source code, just the
compiled assembly, so I am assuming I will need to use reflection. However, I have
not found anything in the System.Reflection namespace that provides the
build mode. Any ideas?
Hi Brad, I know this is possible because I had to do it 2 or 3 years ago. My
memory is getting progressively worse these days, but I'm pretty sure I used
the DebuggableAttribute. Have a look at it, it allows you to check whether
the code is JIT optimised or not. I'm pretty sure that this attribute is
added to an assembly automagically on a debug build. So a wee bit of
reflection should give you the information you need.
--
Regards,
Tim Haughton
Agitek
http://agitek.co.uk http://blogitek.com/timhaughton