> ## Content Index
> Fetch the complete content index at: https://blogs.remobjects.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# FxCop
- URL: https://blogs.remobjects.com/2005/04/18/fxcop/
- Published: 2005-04-18T16:10:02.000Z
- Updated: 2018-08-22T06:17:36.000Z
- Author: jimmy
- Tags: #Import 2026-08-17 20:17

Today I downloaded [FxCop](http://www.gotdotnet.com/team/fxcop/?ref=blogs.remobjects.com) for the first time (yes, I know I should have done this a long time ago). Not bothering to read any documentation, I loaded up my biggest project and hit “Analyze”. I was presented with a daunting 1,800 messages. Perhaps, I thought, I should start smaller. I loaded up my smallest project; a library containing only one class. Only six messages, much better. I fixed two of these issues (specifying [ComVisible](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Design/MarkAssembliesWithComVisible.html&ref=blogs.remobjects.com) and [minimum security](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Usage/AssembliesShouldDeclareMinimumSecurity.html&ref=blogs.remobjects.com)) but, as I found through the documentation, the other messages could safely be ignored.

I then moved on, analyzing one project at a time. Most of the feedback was useful; some of it (like [ComVisible](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Design/MarkAssembliesWithComVisible.html&ref=blogs.remobjects.com)) I didn’t care about but fixed any way; and some of it just had to be ignored (for example, the [“Avoid calls that box value types” message](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Performance/AvoidCallsThatBoxValueTypes.html&ref=blogs.remobjects.com) had to be ignored in several cases).

Some of the messages I got were quite interesting. For example, I got quite a lot of [“Specify IFormatProvider”](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Globalization/SpecifyIFormatProvider.html&ref=blogs.remobjects.com) messages. [IFormatProvider](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiformatproviderclasstopic.asp&ref=blogs.remobjects.com) is something that I’ve always known about, but never bothered to actually understand. Luckily the FxCop help page for this message proved quite informative and useful. Basically, it says that if you do not specify IFormatProvider, you can easily get unexpected results in certain environments.

Most of the messages were simple mistakes, some of which I couldn’t believe I made. There were quite a few [spelling errors](http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.312&&url=/Naming/IdentifiersShouldBeSpelledCorrectly.html&ref=blogs.remobjects.com) in my variable/method names, a few bad calls to the [ArgumentException](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemargumentexceptionclasstopic.asp&ref=blogs.remobjects.com) constructor (passing a wrong or misspelled argument name), and some other minor but irritating issues.

All in all, my code is way better than before thanks to FxCop. If you still haven’t downloaded it, give it a shot: [http://www.gotdotnet.com/team/fxcop/](http://www.gotdotnet.com/team/fxcop/?ref=blogs.remobjects.com)