<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code Analysis Team Blog : tsbt-dev</title><link>http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx</link><description>Tags: tsbt-dev</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>David Kean's new blog</title><link>http://blogs.msdn.com/fxcop/archive/2008/06/10/david-kean-s-new-blog.aspx</link><pubDate>Tue, 10 Jun 2008 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8589158</guid><dc:creator>David M. Kean</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/8589158.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=8589158</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=8589158</wfw:comment><description>&lt;P&gt;For those that are interested, I've just started a new personal blog, &lt;A class="" href="http://davesbox.com/" mce_href="http://davesbox.com/"&gt;Dave's Box&lt;/A&gt;, where I will be talking about FxCop, Framework Design Guidelines, and the recently announced &lt;A class="" href="http://davesbox.com/archive/2008/06/04/announcing-the-managed-extensibility-framework-ctp.aspx" mce_href="http://davesbox.com/archive/2008/06/04/announcing-the-managed-extensibility-framework-ctp.aspx"&gt;Managed Extensibility Framework&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I've just posted&amp;nbsp;a couple of posts detailing changes&amp;nbsp;we made to FxCop 1.36:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://davesbox.com/archive/2008/06/08/fxcop-now-ships-with-the-spell-checker-libraries.aspx" mce_href="http://davesbox.com/archive/2008/06/08/fxcop-now-ships-with-the-spell-checker-libraries.aspx"&gt;FxCop now ships with the spell checker libraries&lt;/A&gt;&lt;BR&gt;&lt;A class="" href="http://davesbox.com/archive/2008/06/10/reference-resolution-changes-in-code-analysis-and-fxcop-part-1.aspx" mce_href="http://davesbox.com/archive/2008/06/10/reference-resolution-changes-in-code-analysis-and-fxcop-part-1.aspx"&gt;Reference resolution changes in Code Analysis and FxCop&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can subscribe via the one of the two following links:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="VERTICAL-ALIGN: middle" height=14 src="http://davesbox.com/images/feed-icon-14x14.png" width=14 mce_src="http://blogs.msdn.com/images/feed-icon-14x14.png" mce_style="vertical-align: middle"&gt;&amp;nbsp;&lt;A class=null href="http://feeds.feedburner.com/DavesBox" mce_href="http://feeds.feedburner.com/DavesBox"&gt;Subscribe via reader&lt;/A&gt; &lt;BR&gt;&lt;IMG style="VERTICAL-ALIGN: middle" height=14 src="http://davesbox.com/images/email.gif" width=14 mce_src="http://blogs.msdn.com/images/email.gif" mce_style="vertical-align: middle"&gt;&amp;nbsp;&lt;A class=null href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2003699" mce_href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=2003699"&gt;Subscribe via email&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8589158" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Framework+Design+Guidelines/default.aspx">Framework Design Guidelines</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Reporting Code Analysis Defect Counts</title><link>http://blogs.msdn.com/fxcop/archive/2008/01/02/reporting-code-analysis-defect-counts.aspx</link><pubDate>Wed, 02 Jan 2008 23:10:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6958609</guid><dc:creator>conorm</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6958609.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6958609</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6958609</wfw:comment><description>&lt;ul&gt;   &lt;p&gt;Code analysis defect counts are available in the cube that is part of the &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=480&amp;amp;SiteID=1"&gt;TFS Data Warehouse&lt;/a&gt;. This post shows you how to hook up Excel to show code analysis counts in a &lt;a href="http://office.microsoft.com/en-us/excel/HA010346321033.aspx"&gt;pivot table&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;First off you need to connect Excel up to the data warehouse that has the data. Under the &lt;strong&gt;Data&lt;/strong&gt; tab in Excel select &lt;strong&gt;From Other Sources, From Analysis Services&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image001_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="213" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image001_thumb.png" width="435" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Then you need to give the name of the server with the data warehouse. In the standalone TFS case this will be whatever machine is running TFS. Assuming you have read permissions with your Windows account you can click &lt;strong&gt;Next&lt;/strong&gt;, otherwise enter a user name and password that has access to the server and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image002_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="265" alt="clip_image002" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image002_thumb.png" width="346" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Then, select the database (usually TfsWarehouse) and select the &lt;strong&gt;Build&lt;/strong&gt; table.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image003_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="263" alt="clip_image003" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image003_thumb.png" width="356" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Click &lt;strong&gt;Next&lt;/strong&gt; and then supply whatever additional information that will help you remember this data connection.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image004_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="313" alt="clip_image004" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image004_thumb.png" width="361" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Click &lt;strong&gt;Finish&lt;/strong&gt;. Then define how you want to show the data in Excel - e.g. a pivot table.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image005_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="324" alt="clip_image005" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image005_thumb.png" width="367" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt; which gives you the following:&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image006_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="315" alt="clip_image006" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image006_thumb.png" width="372" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;In the &lt;strong&gt;PivotTable Field List&lt;/strong&gt;, Expand &lt;strong&gt;Build Project&lt;/strong&gt; where you will find two fields: &lt;strong&gt;Static Analysis Errors&lt;/strong&gt; and &lt;strong&gt;Static Analysis Warnings&lt;/strong&gt;:&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image007_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="143" alt="clip_image007" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image007_thumb.png" width="234" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;You can click the checkboxes to add these to the values for your table. In most cases &lt;strong&gt;Static Analysis Warnings&lt;/strong&gt; would be the most useful since &lt;strong&gt;Static Analysis Errors&lt;/strong&gt; would typically stop the build.&lt;/p&gt;    &lt;p&gt;To complete the picture you can play with the pivot table and pivot and filter as you see fit. As a simple example you can add the &lt;strong&gt;Build&lt;/strong&gt; field:&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image008_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="107" alt="clip_image008" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image008_thumb.png" width="235" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Which will give you one row per build in the pivot table.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image009_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="165" alt="clip_image009" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/ReportingCodeAnalysisDefectCounts_A7B3/clip_image009_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;Of course this data can be combined with other build data and charted etc. according to your needs. We are considering what reporting to provide in future versions so would love to hear your feedback on this feature and what you would like to see.&lt;/p&gt; &lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6958609" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Tips+and+Tricks/default.aspx">Tips and Tricks</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Come chat with the Code Analysis team tomorrow</title><link>http://blogs.msdn.com/fxcop/archive/2007/12/04/come-chat-with-the-code-analysis-team-tomorrow.aspx</link><pubDate>Tue, 04 Dec 2007 20:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6655538</guid><dc:creator>David M. Kean</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6655538.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6655538</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6655538</wfw:comment><description>&lt;P mce_keep="true"&gt;Join members of the Visual Studio Team System product group to discuss features available in Team Foundation Server, Team Suite, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what's new for these editions for Visual Studio 2008.&lt;/P&gt;
&lt;P mce_keep="true"&gt;We will be holding two sessions:&lt;/P&gt;
&lt;P mce_keep="true"&gt;Join the &lt;A href="http://msdn.microsoft.com/chats"&gt;chat&lt;/A&gt; on Wednesday, December 5th, 2007 from 10:00am - 11:00am Pacific Time. &lt;A href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS10.ics"&gt;Add to Calendar&lt;/A&gt; | &lt;A href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=10&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234"&gt;Additional Time Zones&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -and-&lt;/P&gt;
&lt;P&gt;Join the &lt;A href="http://msdn.microsoft.com/chats"&gt;chat&lt;/A&gt; on Wednesday, December 5th, 2007 from 4:00pm - 5:00pm Pacific Time. &lt;A href="http://www.microsoft.com/communities/chats/vcs/07_1205_msdn_VSTS4.ics"&gt;Add to Calendar&lt;/A&gt; | &lt;A href="http://www.timeanddate.com/worldclock/fixedtime.html?month=12&amp;amp;day=5&amp;amp;year=2007&amp;amp;hour=16&amp;amp;min=0&amp;amp;sec=0&amp;amp;p1=234"&gt;Additional Time Zones&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6655538" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis+Policy/default.aspx">Code Analysis Policy</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Try the Code Analysis Rule Sets Feature in the November &amp;quot;Rosario&amp;quot; November 2007 CTP</title><link>http://blogs.msdn.com/fxcop/archive/2007/11/28/try-the-code-analysis-rule-sets-feature-in-the-november-rosario-november-2007-ctp.aspx</link><pubDate>Thu, 29 Nov 2007 01:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6586375</guid><dc:creator>conorm</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6586375.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6586375</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6586375</wfw:comment><description>&lt;p&gt;We have a great new feature that we are previewing in &lt;em&gt;Microsoft&amp;#174; Visual Studio&amp;#174; Team System code name &amp;#8220;Rosario&amp;#8221; November 2007 CTP&lt;/em&gt;.&amp;#160; This feature allows you to select pre-defined sets of rules to configure code analysis as well as define your own.&amp;#160; To access this feature right click on a project and choose &amp;quot;Properties&amp;quot; then click on the &amp;quot;Code Analysis&amp;quot; tab.&lt;/p&gt;  &lt;p&gt;This feature is in response to the feedback we received that the number of rules is overwhelming and difficult to configure.&lt;/p&gt;  &lt;p&gt;For this preview release we have focused on the core concept and made minimal changes to the UI.&amp;#160; In RTM we will have a new UI and a rich edit experience.&amp;#160; &lt;strong&gt;This release is all about getting your feedback&lt;/strong&gt;.&amp;#160; Try out this feature on your code, use the built-in rule sets and let us know what you think.&amp;#160; Tell us what we missed or what rules you think are there and should not be.&amp;#160; Your real-life experience is our best guide for this feature.&amp;#160; &lt;/p&gt;  &lt;p&gt;You can create a custom rule set to fine tune the exact rules to use.&amp;#160; If you think we should include your custom rule set in the out of the box sets then we want to hear from you (feedback links below).&amp;#160; Just attach the exported file to your connect bug or mail us.&lt;/p&gt;  &lt;p&gt;Some useful links:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Release Post from JeffBe and download instructions - &lt;/strong&gt;&lt;a href="http://blogs.msdn.com/jeffbe/archive/2007/11/28/november-rosario-ctp-now-available.aspx"&gt;here&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Feedback - &lt;/strong&gt;bugs and suggestions can be submitted via &lt;a href="http://connect.microsoft.com/visualstudio"&gt;http://connect.microsoft.com/visualstudio&lt;/a&gt;. Make sure when you submit issues through Connect that you indicate the product version as being &amp;#8220;Visual Studio Team System Code Name &amp;#8220;Rosario&amp;#8221; (November 2007 CTP)&amp;#8221;. That will ensure it gets to the right folks for consideration. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Questions&lt;/strong&gt; - we&amp;#8217;ve created a special forum specifically focused on Rosario: &lt;a href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1736&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1736&amp;amp;SiteID=1&lt;/a&gt; or you can respond to this blog post.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We look forward to hearing from you and hope you enjoy this new feature.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6586375" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Releases/default.aspx">Releases</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Positioning Code Metrics to Management</title><link>http://blogs.msdn.com/fxcop/archive/2007/11/28/positioning-code-metrics-to-management.aspx</link><pubDate>Thu, 29 Nov 2007 01:08:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6585914</guid><dc:creator>conorm</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6585914.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6585914</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6585914</wfw:comment><description>&lt;p&gt;Another question that is coming up is:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How can (or should) code metrics be presented to management ?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;My view is that in all cases the metrics are something that can help make decisions around focus and prioritization. Management should be made aware of the metrics and what they mean to allow them to decide where to focus resources. If management is more levels away from the code then the Maintainability index can serve as a good, simple, metric.&lt;/p&gt;  &lt;p&gt;Sometimes you may ship code that has low maintainability or very high complexity etc. and management would make this decision based on risk, time and resources and perhaps other factors. Metrics helps them make that decision with quantitative data.&lt;/p&gt;  &lt;p&gt;Some possible options:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;p&gt;One option is to present the metrics in terms of risk and mitigation. For example:&lt;/p&gt;      &lt;ol&gt;       &lt;li&gt;Risk: low maintainability in some module &lt;/li&gt;        &lt;li&gt;Mitigation: the module is reviewed. &lt;/li&gt;        &lt;li&gt;Risk: High cyclomatic complexity &lt;/li&gt;        &lt;li&gt;Mitigation: the module has a high number of test cases. &lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;Another option is to evaluate the metrics on legacy code. This could be to select some code that is known to have lots of issues and then run the metrics on the code to see if metrics would report any issues with the code. This could be a good way to show value to management in the metrics themselves and make them case for them as a future preventative measure. &lt;/li&gt;    &lt;li&gt;Yet another option is to present a trend over time. Unfortunately the tool doesn't currently make this very easy but at each milestone of the project you can record the maintainability and other metrics for the modules. This could then be compared across time and used in future planning or to guide management in allocating time and resources to particular parts of the project that are trending badly. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I'd be very interested in hearing other approaches people have taken in presenting metrics or code analysis in general to management.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6585914" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Maintainability Index Range and Meaning</title><link>http://blogs.msdn.com/fxcop/archive/2007/11/20/maintainability-index-range-and-meaning.aspx</link><pubDate>Tue, 20 Nov 2007 19:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6437143</guid><dc:creator>conorm</dc:creator><slash:comments>17</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6437143.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6437143</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6437143</wfw:comment><description>&lt;P&gt;Another question:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The maintainability index has been re-set to lie between 0 and 100.&amp;nbsp; How and why was this done?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The metric originally was calculated as follows (based on the work in Carnegie Mellon University although we modified the Halstead Volume calculation a little since we don't include comments anywhere in our calculation): Maintainability Index = 171 - 5.2 * ln(Halstead Volume) - 0.23 * (Cyclomatic Complexity) - 16.2 * ln(Lines of Code)&lt;/P&gt;
&lt;P&gt;This meant that it ranged from 171 to an unbounded negative number.&amp;nbsp; We noticed that as code tended toward 0 it was clearly hard to maintain code and the difference between code at 0 and some negative value was not useful.&amp;nbsp;&amp;nbsp; I'll post some tech ed sample code showing very low maintainability or you can try on your own code to verify.&amp;nbsp; As a result of the decreasing usefulness of the negative numbers and a desire to keep the metric as clear as possible we decided to treat all 0 or less indexes as 0 and then re-base the 171 or less range to be from 0 to 100. Thus, the formula we use is:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://www.sei.cmu.edu/str/descriptions/mitmpm.html" mce_href="http://www.sei.cmu.edu/str/descriptions/mitmpm.html"&gt;Maintainability Index&lt;/A&gt; = MAX(0,(171 - 5.2 * ln(Halstead Volume) - 0.23 * (Cyclomatic Complexity) - 16.2 * ln(Lines of Code))*100 / 171)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;On top of that we decided to be conservative with the thresholds.&amp;nbsp; The desire was that if the index showed red then we would be saying with a high degree of confidence that there was an issue with the code.&amp;nbsp; This gave us the following thresholds (as mentioned in this blog previously):&lt;/P&gt;
&lt;P&gt;For the thresholds we decided to break down this 0-100 range 80-20 so that we kept the noise level low and only flagged code that was really suspicious. We have:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;0-9 = Red&lt;/LI&gt;
&lt;LI&gt;10-19 = Yellow&lt;/LI&gt;
&lt;LI&gt;20-100 = Green&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6437143" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Code Metrics as Check-in Policy</title><link>http://blogs.msdn.com/fxcop/archive/2007/11/15/code-metrics-as-check-in-policy.aspx</link><pubDate>Fri, 16 Nov 2007 10:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6279586</guid><dc:creator>conorm</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6279586.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6279586</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6279586</wfw:comment><description>&lt;P&gt;This is the first in a series of posts around questions I am getting asked related to code metrics.&lt;/P&gt;
&lt;P&gt;One question that is coming up is:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Can a check-in policy be defined based on code metrics in TFS?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Well, code metrics itself does not have a check-in policy but fortunately the Maintainability Index, Class Coupling, Depth of Inheritance and Complexity metrics are all available as rules in Code Analysis in Visual Studio.&amp;nbsp; This means you can use code analysis check-in policy enabled with those rules.&amp;nbsp; The rules are grouped under the "Maintainability Rules" Category and are configured as follows: &lt;BR&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=621 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=160&gt;&lt;B&gt;Metric&lt;/B&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=245&gt;Corresponding Rule&lt;/TD&gt;
&lt;TD class="" vAlign=top width=214&gt;Threshold&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=160&gt;Depth of Inheritance&lt;/TD&gt;
&lt;TD class="" vAlign=top width=246&gt;CA1501 &lt;A href="http://msdn2.microsoft.com/en-us/library/ms182213(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms182213(VS.90).aspx"&gt;AvoidExcessiveInheritance&lt;/A&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=214&gt;Warning at above 5 levels deep&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=160&gt;Complexity&lt;/TD&gt;
&lt;TD class="" vAlign=top width=246&gt;CA1502 &lt;A href="http://msdn2.microsoft.com/en-us/library/ms182212(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms182212(VS.90).aspx"&gt;AvoidExcessiveComplexity&lt;/A&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=214&gt;Warning at above 25&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=160&gt;
&lt;P&gt;Maintainability Index&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=246&gt;CA1505 &lt;A href="http://msdn2.microsoft.com/en-us/library/bb386043(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb386043(VS.90).aspx"&gt;AvoidUnmaintainableCode&lt;/A&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=214&gt;Warning at below 20&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=160&gt;Class Coupling&lt;/TD&gt;
&lt;TD class="" vAlign=top width=246&gt;CA1506 &lt;A href="http://msdn2.microsoft.com/en-us/library/bb397994(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb397994(VS.90).aspx"&gt;AvoidExcessiveClassCoupling&lt;/A&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=214&gt;
&lt;P&gt;Warning at above 80 for class and above 30 for a method&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;In the policy editor this would look like the following: &lt;/P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" alt="Code Metrics as a check-in policy" src="http://blogs.msdn.com/blogfiles/conorm/WindowsLiveWriter/CodeMetricsasCheckinPolicy_F36A/image_2.png" border=0&gt; 
&lt;P&gt;This allows you to enforce that code meets these thresholds before check-in.&amp;nbsp; In future we are looking in to allowing the threshold values to be changed. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6279586" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis+Policy/default.aspx">Code Analysis Policy</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>Code Metrics Customization</title><link>http://blogs.msdn.com/fxcop/archive/2007/11/15/code-metrics-customization.aspx</link><pubDate>Fri, 16 Nov 2007 02:54:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6279992</guid><dc:creator>conorm</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/6279992.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=6279992</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=6279992</wfw:comment><description>&lt;p&gt;A number of people have asked:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Is there a way to customize the existing code metrics or add additional ones?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The simple answer at this time is No.&amp;#xA0; There are no extension points or customizations available at this time for code metrics.&amp;#xA0; This feature was added late in the cycle for VS 2008 and we were out of time to design and add the required hooks. We will use this release to gather feedback about the sorts of extensions you want.&amp;#xA0; &lt;/p&gt;  &lt;p&gt;To that end please feel free to &lt;strong&gt;&lt;em&gt;respond to this post with information about any customizations or additional metrics that would be of interest to you&lt;/em&gt;&lt;/strong&gt;. This will help us a lot in our future planning.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6279992" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - Code Metrics</title><link>http://blogs.msdn.com/fxcop/archive/2007/10/03/new-for-visual-studio-2008-code-metrics.aspx</link><pubDate>Wed, 03 Oct 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5247585</guid><dc:creator>David M. Kean</dc:creator><slash:comments>39</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/5247585.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=5247585</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=5247585</wfw:comment><description>&lt;P&gt;While we've already briefly spoken about Code Metrics &lt;A href="http://blogs.msdn.com/fxcop/archive/2007/02/28/announcing-visual-studio-code-metrics.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2007/02/28/announcing-visual-studio-code-metrics.aspx"&gt;when we announced it&lt;/A&gt;, I thought I would discuss it in a little more depth, in particular the metrics it provides.&lt;/P&gt;
&lt;P&gt;As mentioned previously, Code Metrics is a new tool window that helps users find and act upon complex and unmaintainable areas within an application. &lt;/P&gt;
&lt;P&gt;The following shows the results of running Code Metrics over a fictional business application:&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=450 alt="Code Metrics Results tool window" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/CodeMetrics_3.png" width=867 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/CodeMetrics_3.png"&gt; &lt;/P&gt;
&lt;P&gt;As you can see from above, for Visual Studio 2008, we're providing five metrics. These are detailed below.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Class Coupling&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At each level, this indicates the total number of dependencies that the item has on other types. This number excludes primitive and built-in types such as Int32, String and Object. The higher this number, the more likely changes in other types will ripple though this item. A lower value at the type level can indicate candidates for possible reuse.&lt;/P&gt;
&lt;P&gt;The following shows how coupling is calculated:&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=446 alt="Class Coupling" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/ClassCoupling_3.png" width=583 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/ClassCoupling_3.png"&gt; &lt;/P&gt;
&lt;P align=left&gt;For example, as you can see above, &lt;STRONG&gt;Account &lt;/STRONG&gt;is coupled to two other types, &lt;STRONG&gt;Address&lt;/STRONG&gt; and &lt;STRONG&gt;Order&lt;/STRONG&gt;, whereas &lt;STRONG&gt;Country&lt;/STRONG&gt; is not dependent on any other type.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Depth of Inheritance&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At the type level, depth of inheritance indicates the number of types that are above the type in the inheritance tree. For example, a type that derives directly from Object would have a depth of inheritance of 1. At the namespace and project level, this indicates the highest depth of inheritance of all the types contained within it. This number does not take into consideration the depth of any implemented interfaces. Deep inheritance trees can indicate an over-engineering of a problem and can increase the complexity of testing and maintaining an application. &lt;/P&gt;
&lt;P&gt;The following shows how depth is calculated:&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=454 alt="Depth Of Inheritance" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/DepthOfInheritance_6.png" width=660 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/DepthOfInheritance_6.png"&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For example, in the above inheritance hierarchy, &lt;STRONG&gt;ListControl&lt;/STRONG&gt; and &lt;STRONG&gt;Label &lt;/STRONG&gt;have a depth of inheritance of 3, whereas &lt;STRONG&gt;Component&lt;/STRONG&gt; has a depth of inheritance of 1.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Cyclomatic Complexity &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At each level, this measures the total number of individual paths through the code. This is basically calculated by counting the number of decision points (such as &lt;STRONG&gt;if&lt;/STRONG&gt; blocks, &lt;STRONG&gt;switch&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;cases, and &lt;STRONG&gt;do&lt;/STRONG&gt;, &lt;STRONG&gt;while&lt;/STRONG&gt;,&lt;STRONG&gt; foreach&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;and &lt;STRONG&gt;for&lt;/STRONG&gt;&lt;EM&gt; &lt;/EM&gt;loops) and adding 1. This number is also a good indication on the number of unit tests it will take to achieve full line coverage. Lower is typically better.&lt;/P&gt;
&lt;P&gt;The following shows how complexity is calculated:&lt;/P&gt;
&lt;P align=center&gt;&amp;nbsp;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=485 alt="Cyclomatic Complexity" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/CyclomaticComplexity_3.png" width=666 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/CyclomaticComplexity_3.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Lines of Code&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At each level, this is a measure of the total number of executable lines of code. This excludes white space, comments, braces and the declarations of members, types and namespaces themselves. Lower is typically better.&lt;/P&gt;
&lt;P&gt;The following shows how the lines are calculated:&lt;/P&gt;
&lt;P align=center&gt;&amp;nbsp;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=582 alt="Lines of Code" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/LinesOfCode_3.png" width=666 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/LinesOfCode_3.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Maintainability Index&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;At the member and type level, this is an index from 0 to 100 indicating the overall maintainability of the member or type. At the namespace and assembly level, this is an average of the maintainability index of all types contained within it. This index is based on several other metrics, including &lt;EM&gt;Halstead Volume&lt;/EM&gt; (which factors in the number and use of operands and operators), Cyclomatic Complexity and Lines of Code. A low number indicates code that is complex and hard to maintain.&lt;/P&gt;
&lt;P&gt;The Maintainability Index column also includes a icon that gives a quick indication as to the overall maintainability and complexity of a particular item. The following table shows the range at which an icon is shown:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV align=center&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=591 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=43&gt;
&lt;P align=left&gt;&lt;STRONG&gt;Icon&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=252&gt;
&lt;P align=left&gt;&lt;STRONG&gt;Level&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=294&gt;
&lt;P align=left&gt;&lt;STRONG&gt;Range&lt;/STRONG&gt; &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=center width=44&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=16 alt=Green src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Green_3.png" width=16 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Green_3.png"&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" width=252&gt;
&lt;P align=left&gt;High Maintainability&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" width=294&gt;
&lt;P align=left&gt;Between 20 and 100 inclusive&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=center width=44&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=16 alt=Yellow src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Yellow_5.png" width=16 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Yellow_5.png"&gt;&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=center width=252&gt;
&lt;P align=left&gt;Moderate Maintainability&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" width=294&gt;
&lt;P align=left&gt;Between 10 and 19 inclusive&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=center width=44&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=16 alt=Red src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Red_3.png" width=16 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeMetrics_D90B/Red_3.png"&gt; &lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=center width=252&gt;
&lt;P align=left&gt;Low Maintainability&lt;/P&gt;&lt;/TD&gt;
&lt;TD class="" width=380&gt;
&lt;P align=left&gt;Between 0 and 9 inclusive&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;
&lt;DIV align=left&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV align=left&gt;These icons allow you to see at a glance any trouble spots that you should start to focusing on or filling bugs against.&lt;/DIV&gt;
&lt;DIV align=left&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;Conclusion&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV align=left&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV align=left&gt;Now that you know what these metrics measure, and how they are calculated, the next thing you'll want to know is what you should do when you start to see some red in your application. In a future post, I will cover why should should care about each metric, and how to go about fixing some of the common issues that cause particular metrics to high (or low in the case of Maintainability Index).&lt;/DIV&gt;
&lt;DIV align=left&gt;&lt;/DIV&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5247585" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - The 'Analyze' menu</title><link>http://blogs.msdn.com/fxcop/archive/2007/09/22/new-for-visual-studio-2008-the-analyze-menu.aspx</link><pubDate>Sat, 22 Sep 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5004975</guid><dc:creator>David M. Kean</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/5004975.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=5004975</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=5004975</wfw:comment><description>&lt;P&gt;While Ian Huff has already &lt;A href="http://blogs.msdn.com/ianhu/archive/2007/08/07/the-new-developer-menu-in-visual-studio-team-system.aspx" mce_href="http://blogs.msdn.com/ianhu/archive/2007/08/07/the-new-developer-menu-in-visual-studio-team-system.aspx"&gt;talked about the new 'Developer' menu&lt;/A&gt; that has been added to Visual Studio 2008, I thought I would briefly mention some of the changes to it that were made between Beta 2 and RTM.&lt;/P&gt;
&lt;P&gt;For those that have yet to see this menu, similar to the existing &lt;STRONG&gt;Test&lt;/STRONG&gt; menu, we've added a new top-level menu that will contain the Code Analysis, Code Metrics and Profiling menu items. This was done for discoverability reasons, and something we hope to leverage moving forward towards &lt;A href="http://msdn2.microsoft.com/en-us/teamsystem/bb725993.aspx" mce_href="http://msdn2.microsoft.com/en-us/teamsystem/bb725993.aspx"&gt;Rosario&lt;/A&gt;.&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=312 alt="New Analyze menu" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008TheAnalyzemenu_11837/AnalyzeMenu_3.png" width=759 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008TheAnalyzemenu_11837/AnalyzeMenu_3.png"&gt; &lt;/P&gt;
&lt;P&gt;A quick rundown on some of the things that have changed since Beta 2:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Renamed the menu itself from the very non-specific &lt;STRONG&gt;Developer&lt;/STRONG&gt; to the little bit more descriptive &lt;STRONG&gt;Analyze.&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Removed the &lt;STRONG&gt;Code Analysis&lt;/STRONG&gt; and &lt;STRONG&gt;Code Metrics&lt;/STRONG&gt; sub menus and pulled their associated menu items up one level.&lt;/LI&gt;
&lt;LI&gt;Pulled &lt;STRONG&gt;New Diff Report&lt;/STRONG&gt; up one level and renamed it to &lt;STRONG&gt;Compare Performance Reports...&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Renamed the Code Metrics and Code Analysis menu items: &lt;BR&gt;&lt;STRONG&gt;Generate Code Metrics&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Calculate Code Metrics&lt;/STRONG&gt;. &lt;BR&gt;&lt;STRONG&gt;Migrate Code Analysis Policy Settings to Solution&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Code Analysis Settings for Solution&lt;/STRONG&gt;. &lt;BR&gt;&lt;STRONG&gt;Replace Code Analysis Settings with Code Analysis Policy Settings&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Replace with Check-in Policy &lt;BR&gt;&lt;/STRONG&gt;&lt;STRONG&gt;Add Code Analysis Policy Settings to Code Analysis Settings&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Merge with Check-in Policy &lt;BR&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I probably don't have to tell that these changes, that we made to increase the usability of the menu, are great improvements, especially the renaming of probably what would have been in the running for the longest menu item in Visual Studio; &lt;STRONG&gt;Replace Code Analysis Settings with Code Analysis Policy Settings.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;While a very small addition to Visual Studio 2008, we hope the new &lt;STRONG&gt;Analyze&lt;/STRONG&gt; menu helps improve your workflow when working with the Code Analysis and Profiler features.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5004975" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Metrics/default.aspx">Code Metrics</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis+Policy/default.aspx">Code Analysis Policy</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - Support for anonymous methods and lambda expressions</title><link>http://blogs.msdn.com/fxcop/archive/2007/09/21/new-for-visual-studio-2008-support-for-anonymous-methods-and-lambda-expressions.aspx</link><pubDate>Fri, 21 Sep 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5017697</guid><dc:creator>David M. Kean</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/5017697.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=5017697</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=5017697</wfw:comment><description>&lt;P&gt;One of my favorite new features for Code Analysis in Visual Studio 2008 is our support for analyzing anonymous methods and lambda expressions. While anonymous methods have been around in C# since Visual Studio 2005, lambda expressions are new for both C# and Visual Basic in Visual Studio 2008. &lt;/P&gt;
&lt;P&gt;For those that are already familiar with the concept of anonymous methods (if not &lt;A href="http://msdn.microsoft.com/msdnmag/issues/06/00/C20/default.aspx" mce_href="http://msdn.microsoft.com/msdnmag/issues/06/00/C20/default.aspx"&gt;check out this article&lt;/A&gt;), lambda expressions provide a simpler, more concise syntax for writing inline methods. They also serve as the underpinnings of Linq. &lt;/P&gt;
&lt;P&gt;Take the following code written in Visual Studio 2005 which converts a list of strings to uppercase, for example: &lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;internal&lt;/FONT&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;class&lt;/SPAN&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;StringFormatter&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;&amp;gt; ToUpper(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;&amp;gt; values, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;CultureInfo&lt;/SPAN&gt; culture)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; values.ConvertAll(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;delegate&lt;/SPAN&gt;(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt; value)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; value.ToUpper(culture);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Using the new lambda syntax, the equivalent can be written in C# and Visual Basic like so: &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT face="courier new,courier"&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;internal&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;class&lt;/SPAN&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;StringFormatter&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;&amp;gt; ToUpper(&lt;SPAN style="COLOR: rgb(43,145,175)"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;&amp;gt; values, &lt;SPAN style="COLOR: rgb(43,145,175)"&gt;CultureInfo&lt;/SPAN&gt; culture)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;return&lt;/SPAN&gt; values.ConvertAll(value =&amp;gt; value.ToUpper(culture));&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Friend&lt;/FONT&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Module&lt;/SPAN&gt; StringFormatter&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Public&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Function&lt;/SPAN&gt; ToUpper(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;ByVal&lt;/SPAN&gt; values &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;As&lt;/SPAN&gt; List(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Of&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;String&lt;/SPAN&gt;), &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;ByVal&lt;/SPAN&gt; culture &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;As&lt;/SPAN&gt; CultureInfo) &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;As&lt;/SPAN&gt; List(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Of&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;String&lt;/SPAN&gt;)&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Return&lt;/SPAN&gt; values.ConvertAll(&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Function&lt;/SPAN&gt;(value) value.ToUpper(culture))&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;End&lt;/SPAN&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Function&lt;BR&gt;&lt;BR&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;End&lt;/SPAN&gt; &lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Module&lt;/SPAN&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;To understand how lambda expressions and anonymous methods are implemented underneath in IL (which is important for a tool like Code Analysis that runs over the binary and not the source), see the great in-depth posts by Raymond Chen for C# (&lt;A href="http://blogs.msdn.com/oldnewthing/archive/2006/08/02/686456.aspx" mce_href="http://blogs.msdn.com/oldnewthing/archive/2006/08/02/686456.aspx"&gt;Parts 1&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/oldnewthing/archive/2006/08/03/687529.aspx" mce_href="http://blogs.msdn.com/oldnewthing/archive/2006/08/03/687529.aspx"&gt;2&lt;/A&gt;, and &lt;A href="http://blogs.msdn.com/oldnewthing/archive/2006/08/04/688527.aspx" mce_href="http://blogs.msdn.com/oldnewthing/archive/2006/08/04/688527.aspx"&gt;3&lt;/A&gt;) and Jared Parsons for Visual Basic &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/05/02/closures-in-vb-part-1.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/05/02/closures-in-vb-part-1.aspx"&gt;(Parts 1&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/05/03/closures-in-vb-part-2-method-calls.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/05/03/closures-in-vb-part-2-method-calls.aspx"&gt;2&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/05/25/closures-in-vb-part-3-scope.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/05/25/closures-in-vb-part-3-scope.aspx"&gt;3&lt;/A&gt;, &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/06/15/closures-in-vb-part-4-variable-lifetime.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/06/15/closures-in-vb-part-4-variable-lifetime.aspx"&gt;4&lt;/A&gt; and &lt;A href="http://blogs.msdn.com/vbteam/archive/2007/07/26/closures-in-vb-part-5-looping.aspx" mce_href="http://blogs.msdn.com/vbteam/archive/2007/07/26/closures-in-vb-part-5-looping.aspx"&gt;5&lt;/A&gt;). Once you've read those posts, you'll understand why Code Analysis didn't get support for this for free.&lt;/P&gt;
&lt;P&gt;What does this mean for Code Analysis users? Well, previously, in Visual Studio 2005, the engine would simply skip over these constructs and the user wouldn't find out about any violations, if any, contained within them. The good news is that we will now analyze them. The bad news is that any project making heavy use of anonymous methods is likely no longer Code Analysis clean on its upgrade to Visual Studio 2008. ;)&lt;/P&gt;
&lt;P&gt;For a little more information on Code Analysis's support of anonymous methods, see the following topic: &lt;A href="http://msdn2.microsoft.com/en-us/library/bb514189(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb514189(VS.90).aspx"&gt;Anonymous Methods and Code Analysis&lt;/A&gt; (code formatting to be fixed for RTM).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; These is a bug in Beta 2 that prevents Code Analysis from analyzing lambdas/anonymous methods that access any locals or parameters outside of its own scope. This will be fixed in RTM of Visual Studio 2008.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5017697" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - Code Analysis Policy improvements</title><link>http://blogs.msdn.com/fxcop/archive/2007/09/20/new-for-visual-studio-2008-code-analysis-policy-improvements.aspx</link><pubDate>Thu, 20 Sep 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5002817</guid><dc:creator>David M. Kean</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/5002817.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=5002817</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=5002817</wfw:comment><description>&lt;P&gt;One not very well known feature that lights up when connected to a Team Foundation Server, is the ability to enforce that Code Analysis be run before every check-in. Called a &lt;EM&gt;Code Analysis Policy&lt;/EM&gt;, this feature allows your team to find and fix Code Analysis warnings earlier in the product cycle rather than later, where code changes are riskier and more expensive to make.&lt;/P&gt;
&lt;P&gt;To add a Code Analysis Policy to a Team Project, see the following topic on the MSDN Library, &lt;A href="http://msdn2.microsoft.com/en-us/library/ms181459(vs.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms181459(vs.90).aspx"&gt;How to: Add Check-In Policies&lt;/A&gt;.&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=646 alt="Code Analysis Policy Editor dialog" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyEditor_3.png" width=703 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyEditor_3.png"&gt; &lt;/P&gt;
&lt;P&gt;In Visual Studio 2005, while a useful feature, there were a few usability issues that customers ran into time and time again:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Migrating the Code Analysis settings stored in the policy on the Team Foundation Server to the individual projects was confusing. At times, I literally sat in amazement as I watched my own colleagues new to Code Analysis Policy struggle to perform the (what should have been an easy) task of finding a menu item. &lt;/LI&gt;
&lt;LI&gt;Once the settings had been migrated, users were confused as to why the settings in the individual projects didn't match exactly what was stored in the project. For example, rules turned off in the policy, were still turned on in the project. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Our team actually knew about the confusion that issue 2 would cause when Visual Studio 2005 shipped. Surprisingly as it sounds, this behavior was actually the lesser of two evils. With the time that was available in the ship cycle they knew that they had two distinct choices, either a) have the policy completely override the settings stored in the project, or b) merge the policy settings with the project settings. Because a) prevented the scenario of allowing users to turn on more rules than the policy specified (in effect being stricter than the policy), the later was chosen as the preferred behavior.&lt;/P&gt;
&lt;P&gt;Issue 1 was somewhat of a surprise. Code Analysis Policy along with the rest of Code Analysis was a late edition to Visual Studio 2005, probably too late to get any real user feedback and perform any actionable usability studies. We didn't hear about the troubles users were having with this until after the product had already shipped.&lt;/P&gt;
&lt;P&gt;Once Visual Studio 2008 planning began, improving both of these issues was one of our top priorities, so we set about a &lt;A href="http://search.live.com/results.aspx?q=%22feature+crew%22+microsoft&amp;amp;src=IE-SearchBox" mce_href="http://search.live.com/results.aspx?q=%22feature+crew%22+microsoft&amp;amp;src=IE-SearchBox"&gt;feature crew&lt;/A&gt; to fix it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Code Analysis Policy Failure Details dialog&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Clearly users were first of all struggling to actually perform the migration; they were told by the Policy Failure that their projects settings were out-of-date, but not actually how to go about updating them. Even if they somehow figured out that a menu item might do this, looking intuitively on the individual project's context menus didn't help - the menu item that performed the job, &lt;STRONG&gt;Migrate Code Analysis Policy Settings to Solution &lt;/STRONG&gt;(what a mouthful!),&lt;STRONG&gt; &lt;/STRONG&gt;was hidden under &lt;STRONG&gt;File&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;Source Control&lt;/STRONG&gt; and on the solution's context menu.&lt;/P&gt;
&lt;P&gt;The first thing we did to solve this confusion was to add a new dialog (displayed when double-clicking on a Code Analysis policy failure) that provided extra information about the situation they were in, what projects were out-of-date and how to go about solving it.&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG height=569 alt="New Code Analysis Policy Failures Details dialog" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyFailuresDialog_3.png" width=867 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyFailuresDialog_3.png"&gt;&lt;/P&gt;
&lt;P&gt;We also chose to tell them at this time that their build date was out-of-date - something that we previously only told them after they had updated their project settings and then attempted to check-in again (breaking their workflow).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;New Policy Menu Items&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The way to solve the second issue was easy; provide the user a choice:&lt;/P&gt;
&lt;P align=center&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=220 alt="New Code Analysis Policy menus" src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyMenus_8.png" width=532 border=0 mce_src="http://blogs.msdn.com/blogfiles/fxcop/WindowsLiveWriter/NewforVisualStudio2008CodeAnalysisPolicy_B5EB/CodeAnalysisPolicyMenus_8.png"&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Some users preferred policy to win out and completely overwrite the local project settings, whereas, others wanted to be able to specify additional rules above and beyond what was specified in the policy (ie the current Visual Studio 2005 behavior). The new &lt;STRONG&gt;Analyze&lt;/STRONG&gt; menu (which I'll talk about in a future post), now provides two menu items, &lt;STRONG&gt;Replace with Check-in Policy&lt;/STRONG&gt; and &lt;STRONG&gt;Merge with Check-in Policy&lt;/STRONG&gt;, for performing both of these actions, respectively.&lt;/P&gt;
&lt;P&gt;Hopefully these changes will make using Code Analysis Policy a little more pleasant experience in Visual Studio 2008. The new dialog and menu items themselves made into Beta 2 (albeit with slightly different text and names), so &lt;A href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" mce_href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;install it&lt;/A&gt; today and tell what you think.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5002817" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis+Policy/default.aspx">Code Analysis Policy</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - Custom Dictionaries</title><link>http://blogs.msdn.com/fxcop/archive/2007/08/20/new-for-visual-studio-2008-custom-dictionaries.aspx</link><pubDate>Mon, 20 Aug 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4363203</guid><dc:creator>David M. Kean</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/4363203.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=4363203</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=4363203</wfw:comment><description>&lt;P&gt;Once you turn on the &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2007/08/12/new-for-visual-studio-2008-spelling-rules.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2007/08/12/new-for-visual-studio-2008-spelling-rules.aspx"&gt;new spelling rules&lt;/A&gt;&amp;nbsp;that we've added to Visual Studio 2008, you will want to start to customize the words that it fires on; this is where the new custom dictionary support comes in. A custom dictionary in its basic form, similar to the concept in Microsoft Word, allows you to&amp;nbsp;silence the spell checker over the words that are not&amp;nbsp;in the standard&amp;nbsp;dictionary, such as company&amp;nbsp;and product names.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Adding a custom dictionary&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;to a project&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To add a custom dictionary to a&amp;nbsp;C# and Visual Basic&amp;nbsp;project is simple:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, right-click on the project and choose &lt;STRONG&gt;Add&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;New Item...&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Templates&lt;/STRONG&gt;,&amp;nbsp;select &lt;STRONG&gt;XML File&lt;/STRONG&gt;, enter a name for the dictionary, such as &lt;EM&gt;CodeAnalysisDictionary.xml&lt;/EM&gt; and click &lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, right-click on the XML file and choose &lt;STRONG&gt;Properties&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Properties&lt;/STRONG&gt; tool window, under &lt;STRONG&gt;Build Action&lt;/STRONG&gt; choose &lt;STRONG&gt;CodeAnalysisDictionary&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, double-click on the newly created dictionary to open it&lt;/LI&gt;
&lt;LI&gt;In the XML editor, paste the following, replacing&lt;EM&gt; [productname]&lt;/EM&gt; and &lt;EM&gt;[companyname]&lt;/EM&gt; with your team's equivalents:&lt;BR&gt;
&lt;P&gt;&amp;lt;?&lt;FONT color=#a31515 size=2&gt;xml&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;version&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;1.0&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;encoding&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;utf-8&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; ?&amp;gt;&lt;BR&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Dictionary&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Words&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Recognized&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff size=2&gt;&amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Word&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;&lt;EM&gt;[productname]&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Word&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Word&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;&lt;EM&gt;[companyname]&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Word&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;&lt;BR&gt;&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Recognized&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Words&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;Dictionary&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;You are now ready to start entering your own custom words. Simply add a new &lt;STRONG&gt;&amp;lt;Word&amp;gt;&lt;/STRONG&gt; element for each word in your project that does not exist in the dictionary. Each word is case-insensitive,&amp;nbsp;so any&amp;nbsp;casing of the word will be recognized. Code Analysis will automatically pick up the custom dictionary the next time it is run.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sharing a custom dictionary between projects&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Once you have worked through the above steps, the following will be added automatically to your MSBuild-based project (ie csproj or vbproj):&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;ItemGroup&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;CodeAnalysisDictionary&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; &lt;/FONT&gt;&lt;FONT color=#ff0000 size=2&gt;Include&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;=&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CodeAnalysisDictionary.xml&lt;/FONT&gt;&lt;FONT size=2&gt;"&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt; /&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;ItemGroup&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;This means that similar to other Code Analysis properties and items, this information can &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/11/16/faq-how-do-i-share-managed-code-analysis-rule-settings-over-multiple-projects-david-kean.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/11/16/faq-how-do-i-share-managed-code-analysis-rule-settings-over-multiple-projects-david-kean.aspx"&gt;be placed&amp;nbsp;a common&amp;nbsp;targets file to be shared by multiple projects&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If you&amp;nbsp;do not want to have all projects share a common MSBuild&amp;nbsp;targets file, you can instead do the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Place the custom dictionary file created above in a shared location, such as alongside the solution&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution&lt;/STRONG&gt; &lt;STRONG&gt;Explorer&lt;/STRONG&gt;, right-click on a project and choose &lt;STRONG&gt;Add Item...&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Browse to and click the custom dictionary to select it&lt;/LI&gt;
&lt;LI&gt;On the &lt;STRONG&gt;Add&lt;/STRONG&gt; button, click the down arrow to drop a menu and choose &lt;STRONG&gt;Add As Link&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution&lt;/STRONG&gt; &lt;STRONG&gt;Explorer&lt;/STRONG&gt;, right-click on the&amp;nbsp;custom dictionary&amp;nbsp;and choose &lt;STRONG&gt;Properties&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Properties&lt;/STRONG&gt; tool window, under &lt;STRONG&gt;Build Action&lt;/STRONG&gt; choose &lt;STRONG&gt;CodeAnalysisDictionary&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Repeat steps 2 - 6 for each project you want to share the custom dictionary&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Advanced&amp;nbsp;usage of a custom dictionary&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have shown you above basic usage of the new dictionary support the Code Analysis team has added to Visual Studio 2008. Those that have previously&amp;nbsp;used custom dictionaries with FxCop, will realize that&amp;nbsp;there are more&amp;nbsp;things that you can add to these files that will customize other naming-based rules. However, for now I will leave you with the above and talk about advanced usage of a custom dictionary in future posts.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4363203" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Rules/default.aspx">Rules</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>New for Visual Studio 2008 - Spelling rules</title><link>http://blogs.msdn.com/fxcop/archive/2007/08/12/new-for-visual-studio-2008-spelling-rules.aspx</link><pubDate>Sun, 12 Aug 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4329407</guid><dc:creator>David M. Kean</dc:creator><slash:comments>13</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/4329407.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=4329407</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=4329407</wfw:comment><description>&lt;P&gt;Surprisingly, one the biggest requests for Code Analysis in Visual Studio 2005 was to include the spelling rules that shipped with the FxCop standalone. We had Microsoft consultants tell us that they actually had trouble moving some customers from FxCop to Code Analysis because they were not included. Apparently teams care about spelling. :)&lt;/P&gt;
&lt;P&gt;Well, we've listened and I'm glad to tell you that we are shipping&amp;nbsp;the following rules&amp;nbsp;in Visual Studio 2008:&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb264492(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb264492(VS.90).aspx"&gt;IdentifiersShouldBeSpelledCorrectly&lt;/A&gt;&lt;BR&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb264474(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb264474(VS.90).aspx"&gt;CompoundWordsShouldBeCasedCorrectly&lt;/A&gt;&lt;BR&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb264483(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb264483(VS.90).aspx"&gt;ResourceStringsShouldBeSpelledCorrectly&lt;/A&gt;&lt;BR&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb264481(vs.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb264481(vs.90).aspx"&gt;ResourceStringCompoundWordsShouldBeCasedCorrectly&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;These new rules (along with the rest of the previously FxCop-only rules) now&amp;nbsp;cause the analysis in&amp;nbsp;Visual Studio 2008 to become a true superset of what is available in FxCop.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;API&amp;nbsp;Rules&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By default, the IdentifiersShouldBeSpelledCorrectly and CompoundWordsShouldBeCasedCorrectly, which&amp;nbsp;both fire on the naming of API members, use the installed language of Visual Studio to determine the locale to spell check the identifiers in. To customize this, simply add&amp;nbsp;the &lt;STRONG&gt;&amp;lt;CodeAnalysisCulture&amp;gt;&lt;/STRONG&gt;&amp;nbsp;MSBuild property to your project with&amp;nbsp;a culture&amp;nbsp;representing the language of the API you are writing:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG title="CodeAnalysisCulture MSBuild property" alt="CodeAnalysisCulture MSBuild property" src="http://blogs.msdn.com/photos/fxcop/images/4330079/original.aspx" mce_src="http://blogs.msdn.com/photos/fxcop/images/4330079/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;It is advisable to explicitly specify above when you have developers working on different languages versions of Visual Studio. Unfortunately, due to some complex licensing reasons, we were only&amp;nbsp;able to ship the English lexicons so only the English-based (en-US, en-GB, en-CA and en-AU in particular) cultures actually affect the spell checker.&amp;nbsp;All other cultures cause the rules to silently disable themselves.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Resource Rules&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The &amp;lt;CodeAnalysisCulture&amp;gt; property is used to indicate the language of your API identifiers; it is not, however, used to determine the language of your ResX-based resources. Instead, for these we use the same mechanism that the runtime uses (or more correctly, what the &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.resources.resourcemanager.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.resources.resourcemanager.aspx"&gt;ResourceManager&lt;/A&gt; uses) to locate resources; the &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.reflection.assemblycultureattribute.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.reflection.assemblycultureattribute.aspx"&gt;AssemblyCultureAttribute&lt;/A&gt; and the &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.resources.neutralresourceslanguageattribute.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.resources.neutralresourceslanguageattribute.aspx"&gt;NeutralResourcesLanguageAttribute&lt;/A&gt; attributes.&amp;nbsp;The former is applied to satellitte assemblies and&amp;nbsp;should&amp;nbsp;never be&amp;nbsp;placed on an assembly with code. Whereas, the later is applied to an assembly with code to indicate the neutral culture of the assembly. These attributes are simply applied at the assembly level and are usually placed in each language's associated AssemblyInfo.cs/AssemblyInfo.vb file. The same cultures as&amp;nbsp;above are supported.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IMG src="http://blogs.msdn.com/photos/fxcop/images/4331287/original.aspx" mce_src="http://blogs.msdn.com/photos/fxcop/images/4331287/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Without one of these attributes on your assembly, the resources contained within it will never be checked by ResourceStringsShouldBeSpelledCorrectly and ResourceStringCompoundWordsShouldBeCasedCorrectly. Luckily, If you forget to apply the attribute, &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb385967(VS.90).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb385967(VS.90).aspx"&gt;Mark assemblies with NeutralResourceLanguageAttribute&lt;/A&gt;, a new performance rule we've added, will remind you.&lt;/P&gt;
&lt;P mce_keep="true"&gt;As you start to running the spelling rules - you might find that you need to add to the list of words that it recognizes - in the next post I will talk about the new custom dictionary support that we've added to Visual Studio 2008.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4329407" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Rules/default.aspx">Rules</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Configuration/default.aspx">Configuration</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item><item><title>What rules do Microsoft have turned on internally?</title><link>http://blogs.msdn.com/fxcop/archive/2007/08/09/what-rules-do-microsoft-have-turned-on-internally.aspx</link><pubDate>Thu, 09 Aug 2007 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4302873</guid><dc:creator>David M. Kean</dc:creator><slash:comments>22</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/4302873.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=4302873</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=4302873</wfw:comment><description>&lt;P&gt;I've&amp;nbsp;recently received a few requests asking about the Code Analysis rules we run internally against Microsoft's own code. While it might come as a surprise, we do not actually run every single rule against our own binaries. There are many reasons for this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Applicability&lt;/STRONG&gt;. Not every rule is applicable to every project, for example, the Design rules might be turned off if you are writing a Windows Application&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Noise rate&lt;/STRONG&gt;. Some rules have a&amp;nbsp;low signal-to-noise ratio. While we try remove as much noise as possible from a rule,&amp;nbsp;some rules, due to&amp;nbsp;limitations&amp;nbsp;in our analysis engine, still remain to be too noisy to be run regularly over large code bases. For example, some of the performance rules lack real context to make a good judge of whether a particular issue will really affect the performance of an application.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Time.&lt;/STRONG&gt; We have to ship eventually - attempting to fix every single violation, for every single binary is just not feasible nor advisable.&amp;nbsp;Therefore we make calls to turn off some rules that may lack value and do not&amp;nbsp;impact the security of the product.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Please note that the following rule sets&amp;nbsp;are applicable only to the Developer&amp;nbsp;Division (although Windows does actually follow the same bar), other&amp;nbsp;divisions, such as MSN, Office, etc&amp;nbsp;each have their own&amp;nbsp;set of enabled rules&amp;nbsp;that&amp;nbsp;may or may not be match what is shown below.&lt;/P&gt;
&lt;P&gt;There are two rule sets; the first, &lt;EM&gt;Public Rule Set&lt;/EM&gt;, is for assemblies that design for public consumption. That is, assemblies that are designed to have user take a reference to them in their own projects (such as System.Core.dll). The second, &lt;EM&gt;Non-Public Rule Set&lt;/EM&gt;,&amp;nbsp;is for assemblies are not designed to be consumed by users (such as FxCopCmd.exe). Both sets are listed below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=3&gt;Public Rule Set:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 width=1020 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" width="10%"&gt;&lt;B&gt;Design&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1008 &lt;/TD&gt;
&lt;TD class=""&gt;EnumsShouldHaveZeroValue &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1009 &lt;/TD&gt;
&lt;TD class=""&gt;DeclareEventHandlersCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1011 &lt;/TD&gt;
&lt;TD class=""&gt;ConsiderPassingBaseTypesAsParameters &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1012 &lt;/TD&gt;
&lt;TD class=""&gt;AbstractTypesShouldNotHaveConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1014 &lt;/TD&gt;
&lt;TD class=""&gt;MarkAssembliesWithClsCompliant &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1017 &lt;/TD&gt;
&lt;TD class=""&gt;MarkAssembliesWithComVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1018 &lt;/TD&gt;
&lt;TD class=""&gt;MarkAttributesWithAttributeUsage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1019 &lt;/TD&gt;
&lt;TD class=""&gt;DefineAccessorsForAttributeArguments &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1023 &lt;/TD&gt;
&lt;TD class=""&gt;IndexersShouldNotBeMultidimensional &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1025 &lt;/TD&gt;
&lt;TD class=""&gt;ReplaceRepetitiveArgumentsWithParamsArray &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1026 &lt;/TD&gt;
&lt;TD class=""&gt;DefaultParametersShouldNotBeUsed &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1027 &lt;/TD&gt;
&lt;TD class=""&gt;MarkEnumsWithFlags &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1028 &lt;/TD&gt;
&lt;TD class=""&gt;EnumStorageShouldBeInt32 &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1030 &lt;/TD&gt;
&lt;TD class=""&gt;UseEventsWhereAppropriate &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1032 &lt;/TD&gt;
&lt;TD class=""&gt;ImplementStandardExceptionConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1034 &lt;/TD&gt;
&lt;TD class=""&gt;NestedTypesShouldNotBeVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1036 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideMethodsOnComparableTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1038 &lt;/TD&gt;
&lt;TD class=""&gt;EnumeratorsShouldBeStronglyTyped &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1039 &lt;/TD&gt;
&lt;TD class=""&gt;ListsAreStronglyTyped &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1040 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidEmptyInterfaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1041 &lt;/TD&gt;
&lt;TD class=""&gt;ProvideObsoleteAttributeMessage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1043 &lt;/TD&gt;
&lt;TD class=""&gt;UseIntegralOrStringArgumentForIndexers &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1044 &lt;/TD&gt;
&lt;TD class=""&gt;PropertiesShouldNotBeWriteOnly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1045 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotPassTypesByReference &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1046 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotOverloadOperatorEqualsOnReferenceTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1050 &lt;/TD&gt;
&lt;TD class=""&gt;DeclareTypesInNamespaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1051 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotDeclareVisibleInstanceFields &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1052 &lt;/TD&gt;
&lt;TD class=""&gt;StaticHolderTypesShouldBeSealed &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1053 &lt;/TD&gt;
&lt;TD class=""&gt;StaticHolderTypesShouldNotHaveConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1054 &lt;/TD&gt;
&lt;TD class=""&gt;UriParametersShouldNotBeStrings &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1055 &lt;/TD&gt;
&lt;TD class=""&gt;UriReturnValuesShouldNotBeStrings &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1056 &lt;/TD&gt;
&lt;TD class=""&gt;UriPropertiesShouldNotBeStrings &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1057 &lt;/TD&gt;
&lt;TD class=""&gt;StringUriOverloadsCallSystemUriOverloads &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1058 &lt;/TD&gt;
&lt;TD class=""&gt;TypesShouldNotExtendCertainBaseTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1059 &lt;/TD&gt;
&lt;TD class=""&gt;MembersShouldNotExposeCertainConcreteTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Globalization&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1300 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyMessageBoxOptions &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1301 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidDuplicateAccelerators &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1304 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyCultureInfo &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1305 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyIFormatProvider &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1306 &lt;/TD&gt;
&lt;TD class=""&gt;SetLocaleForDataTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1307 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyStringComparison &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1309 &lt;/TD&gt;
&lt;TD class=""&gt;UseOrdinalStringComparison &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2101 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyMarshalingForPInvokeStringArguments &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Interoperability&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1401 &lt;/TD&gt;
&lt;TD class=""&gt;PInvokesShouldNotBeVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1402 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidOverloadsInComVisibleInterfaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1403 &lt;/TD&gt;
&lt;TD class=""&gt;AutoLayoutTypesShouldNotBeComVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1404 &lt;/TD&gt;
&lt;TD class=""&gt;CallGetLastErrorImmediatelyAfterPInvoke &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1405 &lt;/TD&gt;
&lt;TD class=""&gt;ComVisibleTypeBaseTypesShouldBeComVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1406 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidInt64ArgumentsForVB6Clients &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1408 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotUseAutoDualClassInterfaceType &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1413 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidNonpublicFieldsInComVisibleValueTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Naming&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1700 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotNameEnumValuesReserved &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1701 &lt;/TD&gt;
&lt;TD class=""&gt;ResourceStringCompoundWordsShouldBeCasedCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1702 &lt;/TD&gt;
&lt;TD class=""&gt;CompoundWordsShouldBeCasedCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1703 &lt;/TD&gt;
&lt;TD class=""&gt;ResourceStringsShouldBeSpelledCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1704 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldBeSpelledCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1707 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldNotContainUnderscores &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1708 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldDifferByMoreThanCase &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1709 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldBeCasedCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1710 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldHaveCorrectSuffix &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1711 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldNotHaveIncorrectSuffix &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1712 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotPrefixEnumValuesWithTypeName &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1713 &lt;/TD&gt;
&lt;TD class=""&gt;EventsShouldNotHaveBeforeOrAfterPrefix &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1714 &lt;/TD&gt;
&lt;TD class=""&gt;FlagsEnumsShouldHavePluralNames &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1715 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldHaveCorrectPrefix &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1716 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldNotMatchKeywords &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1719 &lt;/TD&gt;
&lt;TD class=""&gt;ParameterNamesShouldNotMatchMemberNames &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1720 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldNotContainTypeNames &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1721 &lt;/TD&gt;
&lt;TD class=""&gt;PropertyNamesShouldNotMatchGetMethods &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1722 &lt;/TD&gt;
&lt;TD class=""&gt;IdentifiersShouldNotHaveIncorrectPrefix &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1724 &lt;/TD&gt;
&lt;TD class=""&gt;TypeNamesShouldNotMatchNamespaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Performance&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1811 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidUncalledPrivateCode &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1812 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidUninstantiatedInternalClasses &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1813 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidUnsealedAttributes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1815 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideEqualsAndOperatorEqualsOnValueTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1816 &lt;/TD&gt;
&lt;TD class=""&gt;DisposeMethodsShouldCallSuppressFinalize &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1819 &lt;/TD&gt;
&lt;TD class=""&gt;PropertiesShouldNotReturnArrays &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Portability&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1900 &lt;/TD&gt;
&lt;TD class=""&gt;ValueTypeFieldsShouldBePortable &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1901 &lt;/TD&gt;
&lt;TD class=""&gt;PInvokeDeclarationsShouldBePortable &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp; &lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Reliability&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2001 &lt;/TD&gt;
&lt;TD class=""&gt;AvoidCallingProblematicMethods &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2002 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotLockOnObjectsWithWeakIdentity &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2004 &lt;/TD&gt;
&lt;TD class=""&gt;RemoveCallsToGCKeepAlive &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2006 &lt;/TD&gt;
&lt;TD class=""&gt;UseSafeHandleToEncapsulateNativeResources &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Security&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2102 &lt;/TD&gt;
&lt;TD class=""&gt;CatchNonClsCompliantExceptionsInGeneralHandlers &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2103 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewImperativeSecurity &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2104 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotDeclareReadOnlyMutableReferenceTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2105&amp;nbsp; &lt;/TD&gt;
&lt;TD class=""&gt;ArrayFieldsShouldNotBeReadOnly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2106 &lt;/TD&gt;
&lt;TD class=""&gt;SecureAsserts &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2107 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewDenyAndPermitOnlyUsage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2108 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewDeclarativeSecurityOnValueTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2109 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewVisibleEventHandlers &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2111 &lt;/TD&gt;
&lt;TD class=""&gt;PointersShouldNotBeVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2112 &lt;/TD&gt;
&lt;TD class=""&gt;SecuredTypesShouldNotExposeFields &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2114 &lt;/TD&gt;
&lt;TD class=""&gt;MethodSecurityShouldBeASupersetOfType &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2115 &lt;/TD&gt;
&lt;TD class=""&gt;CallGCKeepAliveWhenUsingNativeResources &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2116 &lt;/TD&gt;
&lt;TD class=""&gt;AptcaMethodsShouldOnlyCallAptcaMethods &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2117 &lt;/TD&gt;
&lt;TD class=""&gt;AptcaTypesShouldOnlyExtendAptcaBaseTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2118 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewSuppressUnmanagedCodeSecurityUsage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2119 &lt;/TD&gt;
&lt;TD class=""&gt;SealMethodsThatSatisfyPrivateInterfaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2120 &lt;/TD&gt;
&lt;TD class=""&gt;SecureSerializationConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2121 &lt;/TD&gt;
&lt;TD class=""&gt;StaticConstructorsShouldBePrivate &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2122 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotIndirectlyExposeMethodsWithLinkDemands &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2123 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideLinkDemandsShouldBeIdenticalToBase &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2124 &lt;/TD&gt;
&lt;TD class=""&gt;WrapVulnerableFinallyClausesInOuterTry &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2126 &lt;/TD&gt;
&lt;TD class=""&gt;TypeLinkDemandsRequireInheritanceDemands &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2127 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentAssembliesShouldNotContainSecurityCriticalCode &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2128 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentCodeShouldNotAssert &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2129 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentCodeShouldNotReferenceNonpublicSecurityCriticalCode &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Usage&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1806 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotIgnoreMethodResults &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2207 &lt;/TD&gt;
&lt;TD class=""&gt;InitializeValueTypeStaticFieldsInline &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2208 &lt;/TD&gt;
&lt;TD class=""&gt;InstantiateArgumentExceptionsCorrectly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2209 &lt;/TD&gt;
&lt;TD class=""&gt;AssembliesShouldDeclareMinimumSecurity &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2211 &lt;/TD&gt;
&lt;TD class=""&gt;NonConstantFieldsShouldNotBeVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2213 &lt;/TD&gt;
&lt;TD class=""&gt;DisposableFieldsShouldBeDisposed &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2214 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotCallOverridableMethodsInConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2216 &lt;/TD&gt;
&lt;TD class=""&gt;DisposableTypesShouldDeclareFinalizer &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2217 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotMarkEnumsWithFlags &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2218 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideGetHashCodeOnOverridingEquals &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2220 &lt;/TD&gt;
&lt;TD class=""&gt;FinalizersShouldCallBaseClassFinalizer &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2221 &lt;/TD&gt;
&lt;TD class=""&gt;FinalizersShouldBeProtected &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2224 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideEqualsOnOverloadingOperatorEquals &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2225 &lt;/TD&gt;
&lt;TD class=""&gt;OperatorOverloadsHaveNamedAlternates &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2227 &lt;/TD&gt;
&lt;TD class=""&gt;CollectionPropertiesShouldBeReadOnly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2228 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotShipUnreleasedResourceFormats &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2229 &lt;/TD&gt;
&lt;TD class=""&gt;ImplementSerializationConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2230 &lt;/TD&gt;
&lt;TD class=""&gt;UseParamsForVariableArguments &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2233 &lt;/TD&gt;
&lt;TD class=""&gt;OperationsShouldNotOverflow &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2234 &lt;/TD&gt;
&lt;TD class=""&gt;PassSystemUriObjectsInsteadOfStrings &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2235 &lt;/TD&gt;
&lt;TD class=""&gt;MarkAllNonSerializableFields &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2236 &lt;/TD&gt;
&lt;TD class=""&gt;CallBaseClassMethodsOnISerializableTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2237 &lt;/TD&gt;
&lt;TD class=""&gt;MarkISerializableTypesWithSerializable &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2240 &lt;/TD&gt;
&lt;TD class=""&gt;ImplementISerializableCorrectly &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size=3&gt;Non-Public Rule Set:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=0 width=937 border=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" width="10%"&gt;&lt;B&gt;Globalization&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2101 &lt;/TD&gt;
&lt;TD class=""&gt;SpecifyMarshalingForPInvokeStringArguments &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Portability&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1900 &lt;/TD&gt;
&lt;TD class=""&gt;ValueTypeFieldsShouldBePortable &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA1901 &lt;/TD&gt;
&lt;TD class=""&gt;PInvokeDeclarationsShouldBePortable &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Reliability&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2002 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotLockOnObjectsWithWeakIdentity &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Security&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2100 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewSqlQueriesForSecurityVulnerabilities &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2102 &lt;/TD&gt;
&lt;TD class=""&gt;CatchNonClsCompliantExceptionsInGeneralHandlers &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2103 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewImperativeSecurity &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2104 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotDeclareReadOnlyMutableReferenceTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2105 &lt;/TD&gt;
&lt;TD class=""&gt;ArrayFieldsShouldNotBeReadOnly &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2106 &lt;/TD&gt;
&lt;TD class=""&gt;SecureAsserts &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2107 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewDenyAndPermitOnlyUsage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2108 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewDeclarativeSecurityOnValueTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2109 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewVisibleEventHandlers &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2111 &lt;/TD&gt;
&lt;TD class=""&gt;PointersShouldNotBeVisible &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2112 &lt;/TD&gt;
&lt;TD class=""&gt;SecuredTypesShouldNotExposeFields &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2114 &lt;/TD&gt;
&lt;TD class=""&gt;MethodSecurityShouldBeASupersetOfType &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2115 &lt;/TD&gt;
&lt;TD class=""&gt;CallGCKeepAliveWhenUsingNativeResources &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2116 &lt;/TD&gt;
&lt;TD class=""&gt;AptcaMethodsShouldOnlyCallAptcaMethods &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2117 &lt;/TD&gt;
&lt;TD class=""&gt;AptcaTypesShouldOnlyExtendAptcaBaseTypes &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2118 &lt;/TD&gt;
&lt;TD class=""&gt;ReviewSuppressUnmanagedCodeSecurityUsage &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2119 &lt;/TD&gt;
&lt;TD class=""&gt;SealMethodsThatSatisfyPrivateInterfaces &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2120 &lt;/TD&gt;
&lt;TD class=""&gt;SecureSerializationConstructors &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2121 &lt;/TD&gt;
&lt;TD class=""&gt;StaticConstructorsShouldBePrivate &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2122 &lt;/TD&gt;
&lt;TD class=""&gt;DoNotIndirectlyExposeMethodsWithLinkDemands &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2123 &lt;/TD&gt;
&lt;TD class=""&gt;OverrideLinkDemandsShouldBeIdenticalToBase &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2124 &lt;/TD&gt;
&lt;TD class=""&gt;WrapVulnerableFinallyClausesInOuterTry &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2126 &lt;/TD&gt;
&lt;TD class=""&gt;TypeLinkDemandsRequireInheritanceDemands &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2127 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentAssembliesShouldNotContainSecurityCriticalCode &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2128 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentCodeShouldNotAssert &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2129 &lt;/TD&gt;
&lt;TD class=""&gt;SecurityTransparentCodeShouldNotReferenceNonpublicSecurityCriticalCode &lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;&lt;B&gt;Usage&lt;/B&gt;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;CA2233 &lt;/TD&gt;
&lt;TD class=""&gt;OperationsShouldNotOverflow &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Now, while the above rules are set&amp;nbsp;and mandated at the Division-level, individual teams&amp;nbsp;can (and do) add additional rules. For example, most assemblies, whether public or not, at a minimum follow the Public Rule Set.&amp;nbsp;The Code Analysis team itself actually turns on every single rule to run over the binaries that we release.&lt;/P&gt;
&lt;P&gt;Also note that because they are set at the start of a product cycle and are not changed again until the start of the next cycle, rule sets do not include rules that are new to Visual Studio 2008 (with exception to security rules). This is prevent the situation of the introduction of a new rule causing existing code to be no longer be Code Analysis clean (ie moving the basket). &lt;/P&gt;
&lt;P&gt;These rule&amp;nbsp;sets will be revisited for Rosario and beyond.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4302873" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Rules/default.aspx">Rules</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Team+System/default.aspx">Team System</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Code+Analysis/default.aspx">Code Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Dogfooding/default.aspx">Dogfooding</category></item></channel></rss>