New Message on dotNET User Group Hyd

coding practices - Part 7 (FxCop)

Reply
  Reply to Sender   Recommend Message 1 in Discussion
From: Anand Kumar

Hi Group,
Today I am covering FxCop.

Analysis is an essential part of application development and maintenance. As your applications grow, objects, properties, and code become increasingly complex and difficult to understand. How many bugs, performance problems, or standards violations are hidden in your .NET application? Without a consistent, automated analysis tool, developing and maintaining programs becomes a difficult task.

FxCop is one of the tools that can be used to help create better applications by enabling you to examine an assembly and check it for compliance using a number of different rules. FxCop comes with a set number of rules created by Microsoft, but you can also create and include your own rules. For instance, if you decided that all classes should have a default constructor that takes no arguments, you could write a rule that checks for a constructor on each class of an assembly. This way, no matter who writes the code, you will have a certain level of consistency. If you want more information on creating custom rules. When you open FxCop you first need to create an FxCop project and then add to it the assembly that you want to test. Once the assembly is added to the project, you can press Analyze, and FxCop will examine the assembly. The errors and warning found in this assembly refer look at the attachment for the output

FxCop found a couple of problems with my assembly. You can double-click on an error to see the details, including a description of the rule and where you can find more information. (Something you can do for fun is run FxCop on the Framework assemblies and see what turns up.) FxCop can help you create better, more consistent code, but it cannot make up for poor application design or just plain poor programming. FxCop is also not a replacement for peer code review, but because it can catch a lot of errors before code review, more time can be spent on serious issues rather than having to worry about naming conventions.
FxCop was developed by Microsoft and is available for download from http://www.gotdotnet.com/team/fxcop.

Cheers
Anand
http://spaces.msn.com/members/anandkumar


View Attachment(s)

View other groups in this category.


Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to