Eric's Blog

Day to day experience in .NET
Welcome to Blogs @ IRM Sign in | Join | Help
 Search

Disclaimer

The content of this site is my own personal opinion and does not in any way represent my employer, it's subsideries or affiliates. These postings are provided "AS IS" with no warranties, and confer no rights.

This Blog

Suppressing Name Warnings from Code Analysis

The Code Analysis (FxCop) tools from Team System are great and boosts code quality, but sometimes you know better than the tool. For this situations there is a SuppressMessage attribute in the System.Diagnostics.CodeAnalysis namespace.
For example our company name is IRM and according to the namespace naming guidelines it should be cased as it is defined by our brand (see http://msdn2.microsoft.com/en-US/library/ms229026.aspx for more info). To avoid getting warnings for the capitalization from Code Analysis we simply add this attribute into the AssemblyInfo.cs file.
 
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope="namespace", Target="IRM")]
Published den 7 maj 2006 14:50 by ericqu
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems