FXcop chat on Microsoft Chat Room
Just now the FXcop chat was ended on Microsoft Chat Room.
I asked several questions that was troubling my mind. Here is a cool answer that made me think of a cool application to write...
MikeFan [MS] (Expert):
Q: Will FxCop work with reflection which means that I will have to build the assembly before I get the information about what rules I broken?
A: FxCop is a binary analyzer. So, yes, you must build your assemblies before we can analyze them. FxCop does not use reflection for this work, we have our own, entirely passive metadata reader that cracks binaries and extracts IL for analysis. This metadata reader allows us to avoid loading your assembly into the runtime, which provides several advantages (such as the ability to recompile your dlls with FxCop up and analyzing them).
MikeFan [MS] (Expert):
Q: Wow! MikeFan, will you release a code sample on how to access the assembly metaData without the need to use reflection?
A: We will not be distributing metadata reader samples, no. The reason for this is that our metadata reader is not itself a redistributable library. There is an initiative internally to provide external customers an alternate metadata reader. The group is code-named Phoenix, if you're interested in non-reflection-based assembly browsing, you might try to get more info on them (search the web). Also, Lutz Roeder (author of Reflector and also an MS employee) has developed his own metadata reader that is available for download by visiting his web site. Search on his name or 'reflector' to find a link.