<?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 : Rules</title><link>http://blogs.msdn.com/fxcop/archive/tags/Rules/default.aspx</link><description>Tags: Rules</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Fun with Code Analysis Rule Sets</title><link>http://blogs.msdn.com/fxcop/archive/2008/11/12/fun-with-code-analysis-rulesets.aspx</link><pubDate>Wed, 12 Nov 2008 22:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9064155</guid><dc:creator>cristend</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/9064155.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=9064155</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=9064155</wfw:comment><description>&lt;P&gt;Two weeks ago, I introduced you to Visual Studio 2010 September '08 CTP (Community Technology Preview). This CTP is available as a Virtual PC (VPC) image which can be downloaded at &lt;A href="http://go.microsoft.com/fwlink/?LinkId=129231" mce_href="http://go.microsoft.com/fwlink/?LinkId=129231"&gt;&lt;FONT color=#0000ff&gt;http://go.microsoft.com/fwlink/?LinkId=129231&lt;/FONT&gt;&lt;/A&gt;. The goal of the Community Technology Preview is to obtain feedback from our customers on the new scenarios we have enabled.&amp;nbsp; If you haven't already downloaded the CTP, do it now and take it out for a spin.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;There&amp;nbsp;are many new cool features with the CTP such as an Historical Debugger and&amp;nbsp;Impact Analysis of&amp;nbsp;code changes, but today we are going to focus on &lt;STRONG&gt;Rule Sets&lt;/STRONG&gt; for code analysis. (For an overview of all the neat stuff happening in code analysis, check out this PDC video&amp;nbsp;&lt;SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-theme-font: minor-latin"&gt;&lt;A href="http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/TL60.wmv"&gt;http://mschnlnine.vo.llnwd.net/d1/pdc08/WMV-HQ/TL60.wmv&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;)&amp;nbsp;&amp;nbsp;Configuring code analysis in Visual Studio 2008 and earlier versions required evaluating each individual rule to determine whether it was important enough to turn on and fix for your project. This might be a very time-consuming process that made it difficult to make sure that the most important problems were identified and fixed. With rule sets, code analysis can now be configured much more quickly and easily with sets of rules that are targeted at specific scenarios or areas of emphasis. Let's take a look at&amp;nbsp;how this works.&lt;/P&gt;
&lt;P&gt;The following scenario comes from our CTP walkthrough.&amp;nbsp; You can find the walkthrough and more details when you download the CTP as described above.&amp;nbsp; Let's assume that you have the &lt;EM&gt;&lt;STRONG&gt;DinnerNow – Kiosk&lt;/STRONG&gt;&lt;/EM&gt; solution open and is the active project.&amp;nbsp; On the &lt;STRONG&gt;Analyze&lt;/STRONG&gt; menu, click &lt;STRONG&gt;Configure Code Analysis&lt;/STRONG&gt; &lt;STRONG&gt;for DinnerNow.Restaurants.Kiosk&lt;/STRONG&gt;.&amp;nbsp; The property page for Code Analysis is displayed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;IMG title="Code Analysis Properties" style="WIDTH: 590px; HEIGHT: 376px" height=376 alt="Code Analysis Properties" hspace=1 src="http://blogs.msdn.com/photos/codeanalysis/images/9064354/original.aspx" width=590 vspace=1 border=1 mce_src="http://blogs.msdn.com/photos/codeanalysis/images/9064354/original.aspx"&gt;&lt;/P&gt;
&lt;P class=TextinList1 style="MARGIN: 3pt 0in 3pt 0.25in"&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This screen tells us that &lt;STRONG&gt;Microsoft All Rules&lt;/STRONG&gt; will be executed when we run code analysis, but what if we didn't want to run&amp;nbsp;every Microsoft rule?&amp;nbsp; What if we have a specific scenario we wish to target?&amp;nbsp; We can change which rule set to run by clicking on &lt;STRONG&gt;Open&lt;/STRONG&gt; which brings up:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Add or Remove Rule Sets" style="WIDTH: 590px; HEIGHT: 387px" height=387 alt="Add or Remove Rule Sets" hspace=1 src="http://blogs.msdn.com/photos/codeanalysis/images/9064400/original.aspx" width=590 vspace=1 border=1 mce_src="http://blogs.msdn.com/photos/codeanalysis/images/9064400/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;We can select which rule set(s) by simply selecting or deselecting the appropriate box.&amp;nbsp; Notice that each rule set has a brief description of the types of rules within the rule set.&amp;nbsp; Further, you can open up each individual rule set and see the specific rules that make up the rules sets.&amp;nbsp; You can also turn on or off individual rules within a rule set.&amp;nbsp; Finally, you can adjust the type of action a rule will trigger.&amp;nbsp; In the past, code analysis rules&amp;nbsp;have been limited to build Warnings, but now you can elevate code analysis rules to build Errors.&lt;/P&gt;
&lt;P&gt;As you can see, rules sets provide a powerful way to focus code analysis on the scenarios and rules that matter most to you.&amp;nbsp; You can also create custom rule sets based on your specific needs.&amp;nbsp; We wont go into it today, but if you download the CTP, the Walkthrough explains how to customize a rule set.&lt;/P&gt;
&lt;P&gt;Give it a try and let us know what you think.&lt;/P&gt;
&lt;P&gt;Cris&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9064155" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/Custom+Rules/default.aspx">Custom Rules</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Community/default.aspx">Community</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Rules/default.aspx">Rules</category><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/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+Analysis+Policy/default.aspx">Code Analysis Policy</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/CodeCommunit+Analysis/default.aspx">CodeCommunit Analysis</category></item><item><title>New Code Analysis Features in Visual Studio 2010 September '08 CTP</title><link>http://blogs.msdn.com/fxcop/archive/2008/10/30/new-code-analysis-features-in-visual-studio-2010-september-08-ctp.aspx</link><pubDate>Thu, 30 Oct 2008 20:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9024851</guid><dc:creator>cristend</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/9024851.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=9024851</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=9024851</wfw:comment><description>&lt;P mce_keep="true"&gt;At this year's PDC, Microsoft released Visual Studio 2010 September '08 CTP (Community Technology Preview). This CTP is available as a Virtual PC (VPC) image which can be downloaded at &lt;A href="http://go.microsoft.com/fwlink/?LinkId=129231"&gt;http://go.microsoft.com/fwlink/?LinkId=129231&lt;/A&gt;. The goal of the Community Technology Preview is to obtain feedback from our customers on the new scenarios we have enabled.&amp;nbsp; If you are interested in code analysis, you need to get this CTP and here is why.&lt;/P&gt;
&lt;P&gt;The code analysis team is excited to share with you new code analysis features and rules in this CTP, including:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;I&gt;Rule sets&lt;/I&gt; - code analysis can now be configured much more quickly and easily with sets of rules that are targeted at specific scenarios or areas of emphasis&lt;BR&gt;&lt;BR clear=all&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;I&gt;Enhanced policy support&lt;/I&gt; - enforce your rule set with the code analysis check-in policy&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;I&gt;8 New Data Flow rules&lt;/I&gt; - find hard-to-detect flaws with these advanced dataflow rules for managed code; including certain SQL injection vulnerabilities&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Included with the CTP is a walkthrough guide.&amp;nbsp; Inside the walkthrough is a section dedicated to these exciting code analysis scenarios.&amp;nbsp; Over the next couple of weeks we will continue to blog about rule sets, policy support, and data flow rules so be sure to come back after you get the CTP. &lt;/P&gt;
&lt;P&gt;Now go get the CTP and starting sending us your feedback! &lt;A href="http://go.microsoft.com/fwlink/?LinkId=129231"&gt;http://go.microsoft.com/fwlink/?LinkId=129231&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9024851" 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/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/Code+Analysis+Policy/default.aspx">Code Analysis Policy</category></item><item><title>New for Visual Studio 2008 SP1 and FxCop 1.36 – Multi-targeting rule</title><link>http://blogs.msdn.com/fxcop/archive/2008/08/25/new-for-visual-studio-2008-sp1-and-fxcop-1-36-multi-targeting-rule.aspx</link><pubDate>Mon, 25 Aug 2008 17:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8893369</guid><dc:creator>David M. Kean</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/8893369.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=8893369</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=8893369</wfw:comment><description>&lt;P&gt;I've just published a post over my blog about a new feature we added for Visual Studio 2008 SP1 and FxCop 1.36.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://davesbox.com/archive/2008/08/25/new-for-visual-studio-2008-sp1-and-fxcop-1-36-multi-targeting-rule.aspx" mce_href="http://davesbox.com/archive/2008/08/25/new-for-visual-studio-2008-sp1-and-fxcop-1-36-multi-targeting-rule.aspx"&gt;New for Visual Studio 2008 SP1 and FxCop 1.36 – Multi-targeting rule&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8893369" 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/FxCop/default.aspx">FxCop</category></item><item><title>FxCop 1.36 Released!</title><link>http://blogs.msdn.com/fxcop/archive/2008/08/19/fxcop-1-36-released.aspx</link><pubDate>Tue, 19 Aug 2008 23:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8879660</guid><dc:creator>brettwo</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/8879660.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=8879660</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=8879660</wfw:comment><description>&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 10pt 0.5in" class=MsoListParagraph&gt;&lt;SPAN style="LINE-HEIGHT: 150%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;We are&amp;nbsp;pleased to announce that we've &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&amp;amp;DisplayLang=en"&gt;&lt;FONT color=#0000ff&gt;released the next version of FxCop&lt;/FONT&gt;&lt;/A&gt;. This release has a number of changes since FxCop 1.36 Beta 2, including, but not limited to, the following:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Bug fixes that reduce noise, missing analysis and rule crashes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;New portability rule: Use Only API from Targeted Framework.&amp;nbsp; This rule will fire when the target assembly taking a dependency on a new API only included in a later version or in a service pack.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;New option for new portability rule for selecting target framework for analysis.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Set the target framework in the UI via &lt;B&gt;Project -&amp;gt; Option -&amp;gt; Spelling &amp;amp; Analysis -&amp;gt; Target Framework&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Set the target framework o&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;n the command-line via the /&lt;B&gt;targetframeworkversion&lt;/B&gt; switch. e.g: /targetframeworkversion:v2.0, /targetframeworkversion:v3.0, or /targetframeworkversion:v3.5&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;
&lt;P style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Compared with FxCop 1.35, FxCop 1.36 Beta 2 had changes including, but not limited to, the following:&lt;B&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;200+ bug fixes that reduce noise, missing analysis and rule crashes &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Support for &lt;A href="http://blogs.msdn.com/fxcop/archive/2007/09/21/new-for-visual-studio-2008-support-for-anonymous-methods-and-lambda-expressions.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2007/09/21/new-for-visual-studio-2008-support-for-anonymous-methods-and-lambda-expressions.aspx"&gt;&lt;FONT color=#0000ff&gt;analyzing anonymous methods and lambda expressions&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;New option for skipping analysis over tool generated code&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Turn this on in the UI via &lt;B&gt;Project&lt;/B&gt; -&amp;gt; &lt;B&gt;Options&lt;/B&gt; -&amp;gt; &lt;B&gt;Spelling &amp;amp; Analysis&lt;/B&gt; -&amp;gt; &lt;B&gt;Suppress analysis results against generated code&lt;/B&gt; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Turn this on on the command-line via the &lt;B&gt;/ignoregeneratedcode&lt;/B&gt; switch.&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Better support for C++/CLI and the Compact Framework &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Language 'friendly' API names in the UI and resolutions (ie Visual Basic syntax if running over a Visual Basic binary) &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;New globalization, design and usage rules &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Performance improvements that cut analysis by 2x and use half as much memory &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;Documentation that is &lt;A href="http://msdn2.microsoft.com/en-us/library/bb429476(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb429476(VS.80).aspx"&gt;&lt;FONT color=#0000ff&gt;now available on MSDN&lt;/FONT&gt;&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P style="LINE-HEIGHT: 150%; TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.75in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .75in" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;There are also some other underlying changes that we will talk about in some future posts.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; TEXT-INDENT: 0.5in; MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;/SPAN&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&amp;amp;DisplayLang=en"&gt;&lt;FONT color=#0000ff size=3 face=Calibri&gt;Download it&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3 face=Calibri&gt;, and tell us what you think. If you have any feedback, bug reports or any questions, feel free to head over to the &lt;/FONT&gt;&lt;A href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=98&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=98&amp;amp;SiteID=1"&gt;&lt;FONT size=3 face=Calibri&gt;Code Analysis&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt; forum and ask away.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 0pt 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;SPAN style="mso-bidi-font-family: Arial"&gt;&lt;o:p&gt;&lt;FONT size=3 face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 10pt 0.5in" class=MsoListParagraph&gt;&lt;B&gt;&lt;SPAN style="LINE-HEIGHT: 150%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;Note: &lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="LINE-HEIGHT: 150%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&amp;nbsp;If you already have FxCop 1.36 Beta 2 installed, please uninstall it first before you install FxCop 1.36. Otherwise, you may see an error when you install FxCop 1.36 on top of FxCop 1.36 Beta 2. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 10pt 0.5in" class=MsoListParagraph&gt;&lt;SPAN style="LINE-HEIGHT: 150%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;If you accidentally install FxCop 1.36 without uninstalling FxCop 1.36 Beta 2, please go to Add/Remove program to uninstall FxCop 1.36, and reinstall FxCop 1.36.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT: 150%; MARGIN: 0in 0in 10pt 0.5in" class=MsoListParagraph&gt;&lt;SPAN style="LINE-HEIGHT: 150%; FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt; mso-bidi-font-family: Arial; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin"&gt;&lt;STRONG&gt;[EDIT] Note: &lt;/STRONG&gt;FxCop 1.36 RTM shipped with additional tracing turned on.&amp;nbsp; This can make the FxCop output harder to read.&amp;nbsp; To turn tracing off, edit the FxCop.exe.config or FxCopCmd.exe.config files in the FxCop install directory.&amp;nbsp; Find the line that contains &lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt"&gt;&amp;lt;add name="Trace" value="2" /&amp;gt;&lt;/SPAN&gt; and change the "2" to "0".&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8879660" 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/Releases/default.aspx">Releases</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/C_2B002B00_/default.aspx">C++</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/CodeCommunit+Analysis/default.aspx">CodeCommunit Analysis</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/y/default.aspx">y</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><item><title>TIP: How to change the (Orcas) Managed Code Analysis naming/design rules to fire on internals</title><link>http://blogs.msdn.com/fxcop/archive/2007/05/08/tip-how-to-change-the-orcas-managed-code-analysis-naming-design-rules-to-fire-on-internals.aspx</link><pubDate>Tue, 08 May 2007 18:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1350587</guid><dc:creator>David M. Kean</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1350587.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1350587</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1350587</wfw:comment><description>&lt;P&gt;A&amp;nbsp;while ago&amp;nbsp;&lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/08/08/tip-how-to-change-the-fxcop-naming-design-rules-to-fire-on-internals-david-kean.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/08/08/tip-how-to-change-the-fxcop-naming-design-rules-to-fire-on-internals-david-kean.aspx"&gt;I mentioned&lt;/A&gt; that&amp;nbsp;FxCop&amp;nbsp;(and hence Managed Code Analysis) naming and design rules only fire on publicly visible types and members. &lt;/P&gt;
&lt;P&gt;As you may recall, there were a couple of reason for this:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The &lt;A href="http://msdn2.microsoft.com/en-us/library/ms229042.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms229042.aspx"&gt;.NET Framework Design Guidelines&lt;/A&gt;, which&amp;nbsp;FxCop/Managed Code Analysis enforces,&amp;nbsp;only contains&amp;nbsp;guidelines&amp;nbsp;for publicly visible API. What internal Microsoft teams (and you) do with their internal types and members is completely up to them.&lt;/LI&gt;
&lt;LI&gt;Noise. If you tend to wrap a lot of native types and members, then&amp;nbsp;this internal API could&amp;nbsp;be potentially fire numerous violations.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;In that same post, I also showed how to&amp;nbsp;override this behavior in in FxCop. Now, since then, I've been asked by a few readers on whether it was possible to do this within Visual Studio 2005, unfortunately, the answer up until now was no.&lt;/P&gt;
&lt;P&gt;However, the good news is that in the&amp;nbsp;newly released&amp;nbsp;&lt;A class="" href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" mce_href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx"&gt;Visual Studio 'Orcas' Beta 1&lt;/A&gt;, we sneaked in a small feature in that allows you to override this on a per-project basis. &lt;/P&gt;
&lt;P&gt;To turn it on, simply do the following:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Using Visual Studio, open your project&lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, right-click the project and choose &lt;STRONG&gt;Unload Project&lt;/STRONG&gt;, answering &lt;STRONG&gt;Yes&lt;/STRONG&gt; to any prompt to save changes &lt;/LI&gt;
&lt;LI&gt;In &lt;STRONG&gt;Solution Explorer&lt;/STRONG&gt;, right-click the project and choose &lt;STRONG&gt;Edit&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;Under the first &lt;STRONG&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/STRONG&gt; element, add a new &lt;STRONG&gt;&amp;lt;CodeAnalysisOverrideRuleVisibilities&amp;gt;&lt;/STRONG&gt; element with its value set to &lt;STRONG&gt;true&lt;/STRONG&gt;:&lt;BR&gt;&lt;BR&gt;
&lt;TABLE class=MsoNormalTable style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: #eeeeee; MARGIN: auto; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 border=1 Table class="MsoNormalTable"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" style="BORDER-RIGHT: #cccccc 1pt solid; BORDER-TOP: #cccccc 1pt solid; BORDER-LEFT: #cccccc 1pt solid; BORDER-BOTTOM: #cccccc 1pt solid; BACKGROUND-COLOR: transparent" vAlign=top&gt;
&lt;P style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;nbsp;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt; &lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;DefaultTargets&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="Build"&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;"&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;CodeAnalysisOverrideRuleVisibilities&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;true&lt;EM&gt;&amp;lt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;CodeAnalysisOverrideRuleVisibilities&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: black; FONT-FAMILY: 'Courier New'"&gt;[..]&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;PropertyGroup&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 8pt; COLOR: maroon; FONT-FAMILY: 'Courier New'"&gt;Project&lt;SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In&lt;STRONG&gt; Solution Explorer&lt;/STRONG&gt;, right-click the project and choose &lt;STRONG&gt;Reload Project&lt;/STRONG&gt;, answering &lt;STRONG&gt;Yes &lt;/STRONG&gt;to both prompts&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;The naming and design rules (such as &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms182240(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms182240(VS.80).aspx"&gt;IdentifiersShouldBeCasedCorrectly&lt;/A&gt; and &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/bb264492(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb264492(vs.80).aspx"&gt;IdentifiersShouldBeSpelledCorrectly&lt;/A&gt;) will now run against all types and members, not just those visible outside of the assembly. &lt;/P&gt;
&lt;P&gt;If you want to enable&amp;nbsp;this for all&amp;nbsp;your projects,&amp;nbsp;see the following: &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;FAQ: How do I share Managed Code Analysis rule settings over multiple projects?&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1350587" 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/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/Configuration/default.aspx">Configuration</category></item><item><title>What resolutions or warnings need to provide more information?</title><link>http://blogs.msdn.com/fxcop/archive/2007/02/03/what-resolutions-or-warnings-need-to-provide-more-information.aspx</link><pubDate>Sat, 03 Feb 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1566662</guid><dc:creator>David M. Kean</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1566662.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1566662</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1566662</wfw:comment><description>&lt;P mce_keep="true"&gt;One of things that we are doing for Orcas, is to basically do what we call a &lt;EM&gt;resolution scrub&lt;/EM&gt;. This is where we print out every single possible resolution/warning and read over them to check for consistency, proper grammer and to see if they provide&amp;nbsp;enough information&amp;nbsp;for the user&amp;nbsp;to both understand and fix the issue.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Unfortunately, we know that we are not there yet. An example of a change we are making is when we analyze the following:&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT size=2&gt;IoWriter&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT size=2&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; writeString(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt; word)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;}&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff size=2&gt;public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; writeXML(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt; xml)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;}&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P mce_keep="true"&gt;In Visual Studio 2005/FxCop 1.35, the above type would fire&amp;nbsp;the following four warnings with regards to the casing of name and name of its members (see the &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms229042.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms229042.aspx"&gt;Framework&amp;nbsp;Design Guidelines&lt;/A&gt; for more information):&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Correct the casing of member name 'writeString'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Correct the casing of member name 'writeXML'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) Correct the capitalization of member name 'IoWriter.WriteXML(String):Void'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4) Correct the capitalization of 'Io' in type name 'IoWriter'.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;As you can see, for what&amp;nbsp;seem to be similar checks, there are three different ways to tell the user of the problem. On top of that, even though 2) and 3) are actually&amp;nbsp;raised for two different&amp;nbsp;issues (one for the casing of 'write' and one for the casing of 'XML'), to the user,&amp;nbsp;both seem to be finding the same problem. All four also fail to mention what the casing of the member and type names should be.&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;Orcas, we will be&amp;nbsp;changing the above to the following:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Correct the casing of 'write' in&amp;nbsp;member name 'IoWriter.writeString(String):Void' by changing it to 'Write'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Correct the casing of 'write' in&amp;nbsp;member name 'IoWriter.writeXML(String):Void' by changing it to 'Write'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) Correct the casing of 'XML' in&amp;nbsp;member name 'IoWriter.writeXML(String):Void' by changing it to 'Xml'.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4) Correct the casing of 'Io' in type name 'IoWriter' by changing it to 'IO'.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;At least now they&amp;nbsp;all have the same wording&amp;nbsp;and all of them now tell the user how to &lt;EM&gt;actually&lt;/EM&gt; fix the warning. &lt;/P&gt;
&lt;P mce_keep="true"&gt;What do you think? Is this enough? Or would you like to see more information in the warning with regards to why, for example, 'XML' and 'Io' in particular are cased incorrectly?&lt;/P&gt;
&lt;P mce_keep="true"&gt;Apart from above, what other warnings have you encountered that do not provide&amp;nbsp;enough information? I'm particularly interested in warnings that do not tell the user; 1) why the problem was raised and/or 2)&amp;nbsp;how to fix the problem.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1566662" 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></item><item><title>How to Design Exception Hierarchies</title><link>http://blogs.msdn.com/fxcop/archive/2007/02/01/how-to-design-exception-hierarchies.aspx</link><pubDate>Thu, 01 Feb 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1561628</guid><dc:creator>David M. Kean</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1561628.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1561628</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1561628</wfw:comment><description>&lt;P&gt;Krzysztof Cwalina, owner of the &lt;A class="" href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756" mce_href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321246756"&gt;Framework Design Guidelines&lt;/A&gt;, has written a great post on &lt;A class="" href="http://blogs.msdn.com/kcwalina/archive/2007/01/30/ExceptionHierarchies.aspx" mce_href="http://blogs.msdn.com/kcwalina/archive/2007/01/30/ExceptionHierarchies.aspx"&gt;designing exception hierarchies&lt;/A&gt;. He gives a great overview on the different&amp;nbsp;categories of exceptions, which are placed under two main buckets he calls &lt;EM&gt;usage&lt;/EM&gt; and &lt;EM&gt;system&lt;/EM&gt;, and the right situations to throw them.&lt;/P&gt;
&lt;P&gt;This post also goes hand-in-hand with some of the previous posts on this blog:&lt;BR&gt;&lt;BR&gt;&lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2007/01/22/faq-what-exception-should-i-throw-instead-of-the-reserved-exceptions-found-by-donotraisereservedexceptiontypes.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2007/01/22/faq-what-exception-should-i-throw-instead-of-the-reserved-exceptions-found-by-donotraisereservedexceptiontypes.aspx"&gt;FAQ: What exception should I throw instead of the reserved exceptions that DoNotRaiseReservedExceptionTypes warns against?&lt;/A&gt;&lt;BR&gt;FAQ: Why does FxCop warn against catch(Exception)? (&lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/06/14/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-1-_5B00_Nick-Guerrera_5D00_.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/06/14/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-1-_5B00_Nick-Guerrera_5D00_.aspx"&gt;Part 1&lt;/A&gt;, &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/06/17/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-2-_5B00_Nick-Guerrera_5D00_.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/06/17/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-2-_5B00_Nick-Guerrera_5D00_.aspx"&gt;Part 2&lt;/A&gt;&amp;nbsp;and &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/06/19/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-3-_5B00_Nick-Guerrera_5D00_.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/06/19/FAQ_3A00_-Why-does-FxCop-warn-against-catch_2800_Exception_29003F00_-_2D00_-Part-3-_5B00_Nick-Guerrera_5D00_.aspx"&gt;Part 3&lt;/A&gt;)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1561628" 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/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/Exceptions/default.aspx">Exceptions</category></item><item><title>FAQ: What exception should I throw instead of the reserved exceptions that DoNotRaiseReservedExceptionTypes warns against?</title><link>http://blogs.msdn.com/fxcop/archive/2007/01/22/faq-what-exception-should-i-throw-instead-of-the-reserved-exceptions-found-by-donotraisereservedexceptiontypes.aspx</link><pubDate>Mon, 22 Jan 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1430357</guid><dc:creator>David M. Kean</dc:creator><slash:comments>14</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1430357.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1430357</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1430357</wfw:comment><description>&lt;P&gt;Throwing a general exception type such as &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.exception.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.exception.aspx"&gt;System.Exception&lt;/A&gt; or &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.systemexception.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.systemexception.aspx"&gt;System.SystemException&lt;/A&gt; in a library or Framework forces&amp;nbsp;consumers to catch all exceptions, including unknown exceptions that they do not know how to handle (see &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/06/14/faq-why-does-fxcop-warn-against-catch-exception-nick-guerrera.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/06/14/faq-why-does-fxcop-warn-against-catch-exception-nick-guerrera.aspx"&gt;FAQ: Why does FxCop warn against catch(Exception)?&lt;/A&gt;&amp;nbsp;for reasons as to why this is bad). &lt;/P&gt;
&lt;P&gt;Instead, either throw a more derived type that already exists in the Framework, or create your own type that derives from Exception.&lt;/P&gt;
&lt;P&gt;The following list examples of when you should throw specific exceptions:&lt;/P&gt;
&lt;P&gt;When validating a parameter (including the &lt;EM&gt;value&lt;/EM&gt; parameter in the set accessor of a property) that:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;is a null reference&amp;nbsp;(&lt;STRONG&gt;Nothing&lt;/STRONG&gt; in Visual Basic)&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.argumentnullexception(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.argumentnullexception(vs.80).aspx"&gt;System.ArgumentNullException&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;is outside of the allowable range of values (such as&amp;nbsp;an index for a Collection/List)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.ArgumentOutOfRangeException(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.ArgumentOutOfRangeException(vs.80).aspx"&gt;System.ArgumentOutOfRangeException&lt;/A&gt;&lt;STRONG&gt; &lt;/STRONG&gt;(&lt;STRONG&gt;DO NOT&lt;/STRONG&gt; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.IndexOutOfRangeException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.IndexOutOfRangeException(v.80).aspx"&gt;System.IndexOutOfRangeException&lt;/A&gt;) &lt;/P&gt;
&lt;P&gt;is outside the allowable values for a enum&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.invalidenumargumentexception(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.componentmodel.invalidenumargumentexception(vs.80).aspx"&gt;System.ComponentModel.InvalidEnumArgumentException&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;contains a format that not meet the parameter specifications of a method (such as the format string for ToString(String))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.formatexception(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.formatexception(v.80).aspx"&gt;System.FormatException&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;is otherwise invalid (such as an empty string)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.ArgumentException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.ArgumentException(v.80).aspx"&gt;System.ArgumentException&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When an operation is invalid for an object's current state:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.invalidoperationexception(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.invalidoperationexception(v.80).aspx"&gt;System.InvalidOperationException&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;When an operation is performed on an object that has been disposed:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.ObjectDisposedException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.ObjectDisposedException(v.80).aspx"&gt;System.ObjectDisposedException&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;When an operation is&amp;nbsp;not supported (such as&amp;nbsp;in an overridden&amp;nbsp;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.io.stream.write(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.io.stream.write(v.80).aspx"&gt;Stream.Write&lt;/A&gt;&amp;nbsp;in a &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.io.stream(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.io.stream(VS.80).aspx"&gt;Stream&lt;/A&gt; opened for reading):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.NotSupportedException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.NotSupportedException(v.80).aspx"&gt;System.NotSupportedException&lt;/A&gt;&amp;nbsp;(&lt;STRONG&gt;DO NOT&lt;/STRONG&gt; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.NotImplementedException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.NotImplementedException(v.80).aspx"&gt;System.NotImplementedException&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;When a conversion would result in an overflow (such as in a explicit cast operator overload):&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/System.OverflowException(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/System.OverflowException(v.80).aspx"&gt;System.OverflowException&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For all other situations, consider creating your own type that derives from Exception and throwing that.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;Exceptions&amp;nbsp;that derive from &lt;STRONG&gt;ArgumentException&lt;/STRONG&gt; (including &lt;STRONG&gt;ArgumentNullException&lt;/STRONG&gt;, &lt;STRONG&gt;ArgumentException&lt;/STRONG&gt;,&lt;STRONG&gt; ArgumentOutOfRangeException &lt;/STRONG&gt;and &lt;STRONG&gt;InvalidEnumArgumentException&lt;/STRONG&gt;),&amp;nbsp;&lt;STRONG&gt;InvalidOperationException&lt;/STRONG&gt; (including &lt;STRONG&gt;ObjectDisposedException&lt;/STRONG&gt;) and &lt;STRONG&gt;NotSupportedException&lt;/STRONG&gt;&amp;nbsp;should only be thrown in situations that are avoidable (such as passing a null argument) and if thrown, would indicate a bug in the calling code. The &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.io.path(v.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.io.path(v.80).aspx"&gt;Path&lt;/A&gt; class &lt;EM&gt;is not&lt;/EM&gt; a good example of this, it incorrect throws&amp;nbsp;ArgumentException&amp;nbsp;to indicate that a&amp;nbsp;path is incorrectly formed, however, it does not expose any methods that can help prevent this from occurring.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1430357" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/FAQ/default.aspx">FAQ</category><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/Exceptions/default.aspx">Exceptions</category></item><item><title>TIP: Automatically generate Managed Code Analysis/FxCop suppressions</title><link>http://blogs.msdn.com/fxcop/archive/2007/01/18/tip-how-to-suppress-managed-code-analysis-fxcop-warnings-automatically.aspx</link><pubDate>Thu, 18 Jan 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1429397</guid><dc:creator>David M. Kean</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1429397.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1429397</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1429397</wfw:comment><description>&lt;P&gt;I see a lot of users attempting to hand code a &lt;A href="http://msdn2.microsoft.com/en-us/system.diagnostics.codeanalysis.suppressmessageattribute.aspx" mce_href="http://msdn2.microsoft.com/en-us/system.diagnostics.codeanalysis.suppressmessageattribute.aspx"&gt;SuppressMessageAttribute&lt;/A&gt;&amp;nbsp;themselves. This can be error prone&amp;nbsp;and is not needed when both Visual Studio and the&amp;nbsp;standalone FxCop&amp;nbsp;can automatically generate these for you.&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In Visual Studio 2005&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Right-click a Code Analysis warning in the &lt;STRONG&gt;Error List&lt;/STRONG&gt; and choose &lt;STRONG&gt;Suppress Message(s).&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;In Visual Studio Orcas&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Right-click a Code Analysis warning in the &lt;STRONG&gt;Error List&lt;/STRONG&gt; and choose &lt;STRONG&gt;Suppress Message(s)&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;In Source &lt;/STRONG&gt;or &lt;STRONG&gt;Suppress Message(s)&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;In Project Suppression File&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;In FxCop&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Right-click a warning and choose &lt;STRONG&gt;Copy As&lt;/STRONG&gt; -&amp;gt; &lt;STRONG&gt;SuppressMessage&lt;/STRONG&gt;. 
&lt;LI&gt;Paste the contents of the Clipboard at the top of the code element that caused the warning.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; In both Visual Studio and FxCop you can select multiple warnings and suppress them all once.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1429397" 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/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/Suppressions/default.aspx">Suppressions</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category></item><item><title>FAQ: How do I fix a violation of MovePInvokesToNativeMethodsClass?</title><link>http://blogs.msdn.com/fxcop/archive/2007/01/14/faq-how-do-i-fix-a-violation-of-movepinvokestonativemethodsclass.aspx</link><pubDate>Sun, 14 Jan 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1429197</guid><dc:creator>David M. Kean</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1429197.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1429197</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1429197</wfw:comment><description>&lt;P&gt;&lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms182161(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms182161(VS.80).aspx"&gt;MovePInvokesToNativeMethodsClass&lt;/A&gt; fires on&amp;nbsp;P/Invokes&amp;nbsp;(ie methods marked with DllImport) that are not members of&amp;nbsp;one of the following classes;&amp;nbsp;NativeMethods, SafeNativeMethods or UnsafeNativeMethods.&lt;/P&gt;
&lt;P&gt;For example, the following sample fires this warning.&lt;BR&gt;&lt;BR&gt;&lt;FONT size=2&gt;&lt;FONT face="courier new,courier"&gt;[C#]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Runtime.InteropServices;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;internal&amp;nbsp;static&lt;/FONT&gt;&amp;nbsp;&lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;Directory&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#008000&gt;// Violates MovePInvokesToNativeMethodsClass&lt;/FONT&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#2b91af&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a31515&gt;"kernel32.dll"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;extern&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;bool&lt;/FONT&gt; RemoveDirectory(&lt;FONT color=#0000ff&gt;string&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; name);&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;[Visual Basic]&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Public NotInheritable&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Directory&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Violates MovePInvokesToNativeMethodsClass&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;DllImport(&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#a31515&gt;"kernal32.dll"&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;, CharSet:=CharSet.Auto)&amp;gt; _&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt; RemoveDirectory(&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; Name &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;String&lt;/FONT&gt;) &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Boolean&lt;BR&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Function&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;In the above example, the RemoveDirectory P/Invoke should be moved to an appropriate class that is designed to only hold P/Invokes. 
&lt;P&gt;For most applications, moving P/Invokes to a new class called &lt;EM&gt;NativeMethods&lt;/EM&gt; is typically enough. However, in situations where you are developing reusable libraries for use in other applications then you should also consider defining two other classes called &lt;EM&gt;SafeNativeMethods&lt;/EM&gt; and &lt;EM&gt;UnsafeNativeMethods&lt;/EM&gt;. Both of these classes are similar to the NativeMethods class, however, they are marked with a special attribute called &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/system.security.suppressunmanagedcodesecurityattribute.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.security.suppressunmanagedcodesecurityattribute.aspx"&gt;SuppressUnmanagedCodeSecurityAttribute&lt;/A&gt;. Applying this attribute causes the runtime to avoid performing a full stack walk to make sure that all callers have the &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; permission when calling the p/invoke methods containing within these classes. The runtime will check your library for this permission at startup, however, not the assemblies that reference it. This can greatly improve performance when calling unmanaged code and also allows code with limited permissions to call these methods.&lt;/P&gt;
&lt;P&gt;However, using this attribute should not be taken lightly, as implemented incorrectly it can actually have serious security implications.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;NativeMethods&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;As the NativeMethods class should not be marked with &lt;STRONG&gt;SuppressUnmanagedCodeAttribute&lt;/STRONG&gt;, P/Invokes&amp;nbsp;placed within in it, will require &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; permission. As most applications run from the local machine and run with FullTrust, this is usually not a problem. However, if you developing reusable libraries, you should instead consider defining&amp;nbsp;a SafeNativeMethods or UnsafeNativeMethods class. &lt;/P&gt;
&lt;P&gt;The following example shows a method Interaction.Beep that wraps the MessageBeep function from user32.dll, the MessageBeep P/Invoke is placed within the NativeMethods class.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[C#]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;&lt;FONT face="courier new,courier"&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.ComponentModel;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;Interaction&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;// Callers require Unmanaged permission&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Beep()&lt;BR&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;/FONT&gt;&lt;FONT face="courier new,courier" color=#008000&gt;// No need to demand a permission as callers of Interaction.Beep&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // will require UnmanagedCode permission&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/FONT&gt; (!&lt;FONT color=#2b91af&gt;NativeMethods&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;.MessageBeep(-1))&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&gt;throw&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; &lt;FONT color=#2b91af&gt;Win32Exception&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;internal&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;NativeMethods&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#2b91af&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a31515&gt;"user32.dll"&lt;/FONT&gt;, CharSet = &lt;FONT color=#2b91af&gt;CharSet&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;.Auto)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#0000ff&gt;return&lt;/FONT&gt;: &lt;FONT color=#2b91af&gt;MarshalAs&lt;/FONT&gt;(&lt;FONT color=#2b91af&gt;UnmanagedType&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;.Bool)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;extern&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;bool&lt;/FONT&gt; MessageBeep(&lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; uType);&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[Visual Basic]&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt; System.ComponentModel&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Interaction&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Callers require Unmanaged permission&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Beep()&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' No need to demand a permission as callers of Interaction.Beep&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' will require UnmanagedCode permission&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Not&lt;/FONT&gt; NativeMethods.MessageBeep(-1) &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Then&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&gt;&lt;FONT color=#0000ff&gt;Throw&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Win32Exception()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;If&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Class&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Friend&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; NativeMethods&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&amp;lt;DllImport(&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#a31515&gt;"user32.dll"&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;, CharSet:=CharSet.Auto)&amp;gt; _&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt; MessageBeep(&lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; uType &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Integer&lt;/FONT&gt;) &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &amp;lt;MarshalAs(UnmanagedType.Bool)&amp;gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Boolean&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;In the example above, any assembly that calls NativeMethod.MessageBeep or Interaction.Beep will require &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; permission.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;SafeNativeMethods&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;P/Invoke methods that are safe to be exposed to any application and do not have any side effects should be placed in a class called &lt;EM&gt;SafeNativeMethods&lt;/EM&gt; . No permissions need to be demanded and you do not need to pay too much attention to where they are getting called.&lt;/P&gt;
&lt;P&gt;The following example shows a property Environment.TickCount that wraps the GetTickCount function from kernel32.dll.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[C#]&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;&lt;FONT face="courier new,courier"&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Security;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;Environment&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;// Callers do not require UnmanagedCode permission&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; TickCount&lt;BR&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;/FONT&gt;&lt;FONT face="courier new,courier" color=#0000ff&gt;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&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&gt;&lt;FONT face="courier new,courier" color=#008000&gt;// No need to demand a permission in place of&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&gt;&lt;FONT face="courier new,courier" color=#008000&gt;// UnmanagedCode as GetTickCount is considered&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&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;// a safe method&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&gt;&lt;FONT color=#0000ff&gt;return&lt;/FONT&gt; &lt;FONT color=#2b91af&gt;SafeNativeMethods&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;.GetTickCount();&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;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;SuppressUnmanagedCodeSecurityAttribute&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;]&lt;BR&gt;&lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;SafeNativeMethods&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#2b91af&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a31515&gt;"kernel32.dll"&lt;/FONT&gt;, CharSet = &lt;FONT color=#2b91af&gt;CharSet&lt;/FONT&gt;.Auto, ExactSpelling = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;extern&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;int&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; GetTickCount();&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;[Visual Basic]&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt; System.Security&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Environment&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Callers do not require Unmanaged permission&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;ReadOnly&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Property&lt;/FONT&gt; TickCount() &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#0000ff&gt;Integer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#0000ff&gt;Get&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&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&gt;' No need to demand a permission in place of&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&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&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;' UnmanagedCode as GetTickCount is considered&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&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&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;' a safe method&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&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&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; SafeNativeMethods.GetTickCount()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Property&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;Class&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;SuppressUnmanagedCodeSecurityAttribute()&amp;gt; _&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; SafeNativeMethods&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&amp;lt;DllImport(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#a31515&gt;"kernel32.dll"&lt;/FONT&gt;, CharSet:=CharSet.Auto, ExactSpelling:=&lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)&amp;gt; _&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt; GetTickCount() &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Integer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Function&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;In the above example, although the assembly that defines Environment.TickCount still requires &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; permission, any callers of it do not.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;STRONG&gt;UnsafeNativeMethods&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;P/Invoke methods that are not safe to be called by anyone and can cause side effects should be placed in a class called &lt;EM&gt;UnsafeNativeMethods&lt;/EM&gt; . These methods should be either stringently checked to make sure that they are not being exposed to the user inadvertently (the rule &lt;EM&gt;Review SuppressUnmanagedCodeSecurity usage&lt;/EM&gt; can help with this) or should have another permission demanded in place of &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; when using them.&lt;/P&gt;
&lt;P&gt;The following example shows a method Cursor.Hide that wraps the ShowCursor function from user32.dll.&lt;/P&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[C#]&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Security;&lt;BR&gt;&lt;FONT color=#0000ff&gt;using&lt;/FONT&gt; System.Security.Permissions;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;Cursor&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;// Callers do not require UnmanagedCode permission, however,&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;// they do require UIPermissionWindow.AllWindows&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;void&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Hide()&lt;BR&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;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;// Need to demand an appropriate permission&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;// in place of UnmanagedCode permission as&amp;nbsp;&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;// ShowCursor is not considered a safe method&lt;BR&gt;&lt;FONT color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; UIPermission(UIPermissionWindow.AllWindows).Demand();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#2b91af&gt;UnsafeNativeMethods&lt;/FONT&gt;.ShowCursor(&lt;FONT color=#0000ff&gt;false&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;SuppressUnmanagedCodeSecurityAttribute&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;]&lt;BR&gt;&lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;class&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#2b91af&gt;UnsafeNativeMethods&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;FONT color=#2b91af&gt;DllImport&lt;/FONT&gt;(&lt;FONT color=#a31515&gt;"user32.dll"&lt;/FONT&gt;, CharSet = &lt;FONT color=#2b91af&gt;CharSet&lt;/FONT&gt;.Auto, ExactSpelling = &lt;FONT color=#0000ff&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color=#0000ff&gt;internal&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;static&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;extern&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;int&lt;/FONT&gt; ShowCursor([&lt;FONT color=#2b91af&gt;MarshalAs&lt;/FONT&gt;(&lt;FONT color=#2b91af&gt;UnmanagedType&lt;/FONT&gt;.Bool)]&lt;FONT color=#0000ff&gt;bool&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; bShow);&lt;BR&gt;}&lt;BR&gt;&lt;BR&gt;[Visual Basic]&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Runtime.InteropServices&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; System.Security&lt;BR&gt;&lt;FONT color=#0000ff&gt;Imports&lt;/FONT&gt; System.Security.Permissions&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Cursor&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' Callers do not require Unmanaged permission, however,&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;' they do require UIPermission.AllWindows&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; Hide()&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#008000&gt;&lt;FONT face="courier new,courier"&gt;' Need to demand an appropriate permission&amp;nbsp;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier" color=#008000&gt;' in place of UnmanagedCode permission as&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;' ShowCursor is not considered a safe method&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim&lt;/FONT&gt; permission &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; UIPermission(UIPermissionWindow.AllWindows)&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;permission.Demand()&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;UnsafeNativeMethods.ShowCursor(&lt;FONT color=#0000ff&gt;False&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)&lt;BR&gt;&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Sub&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;Class&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;lt;SuppressUnmanagedCodeSecurityAttribute()&amp;gt; _&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;NotInheritable&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; UnsafeNativeMethods&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;()&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&amp;lt;DllImport(&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#a31515&gt;"user32.dll"&lt;/FONT&gt;, CharSet:=CharSet.Auto, ExactSpelling:=&lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;)&amp;gt; _&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;Friend&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Shared&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Function&lt;/FONT&gt; ShowCursor(&amp;lt;MarshalAs(UnmanagedType.Bool)&amp;gt; &lt;FONT color=#0000ff&gt;ByVal&lt;/FONT&gt; bShow &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;Boolean&lt;/FONT&gt;) &lt;FONT color=#0000ff&gt;As&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color=#0000ff&gt;Integer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;End&lt;/FONT&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;FONT face="courier new,courier"&gt;Function&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt; &lt;FONT color=#0000ff&gt;Class&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;In the above example, although the assembly that&amp;nbsp;defines Cursor.Hide still requires &lt;STRONG&gt;UnmanagedCode &lt;/STRONG&gt;permission, any callers of it do not. In place of &lt;STRONG&gt;UnmanagedCode&lt;/STRONG&gt; however, callers will require &lt;STRONG&gt;UIPermission.AllWindows&lt;/STRONG&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1429197" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/fxcop/archive/tags/FAQ/default.aspx">FAQ</category><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/SuppressUnmanagedCode/default.aspx">SuppressUnmanagedCode</category></item><item><title>January Orcas CTP Released!</title><link>http://blogs.msdn.com/fxcop/archive/2007/01/12/january-orcas-ctp-released.aspx</link><pubDate>Fri, 12 Jan 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1449980</guid><dc:creator>David M. Kean</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1449980.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1449980</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1449980</wfw:comment><description>&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt; A &lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1FF0B35D-0C4A-40B4-915A-5331E11C39E6&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1FF0B35D-0C4A-40B4-915A-5331E11C39E6&amp;amp;displaylang=en"&gt;Virtual PC image&lt;/A&gt; is also available.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We've just released the &lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?familyid=69055927-458B-4129-9047-FCC4FACAE96C&amp;amp;displaylang=en&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=69055927-458B-4129-9047-FCC4FACAE96C&amp;amp;displaylang=en&amp;amp;displaylang=en"&gt;Visual Studio 'Orcas' - January CTP&lt;/A&gt;. This is the first of the side-by-side installable CTPs, however, before installing, please&amp;nbsp;read the &lt;A class="" href="http://download.microsoft.com/download/1/6/c/16c75a10-dc46-429d-9842-81de5485c43f/Visual%20Studio%20Code%20Name%20Orcas%20Release%20Notes_Jan07.htm" mce_href="http://download.microsoft.com/download/1/6/c/16c75a10-dc46-429d-9842-81de5485c43f/Visual%20Studio%20Code%20Name%20Orcas%20Release%20Notes_Jan07.htm"&gt;Release Notes&lt;/A&gt; and do not install this on a production machine as this will likely break Visual Studio 2005 when uninstalled.&lt;/P&gt;
&lt;P&gt;Besides the new features &lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/12/21/two-new-features-for-orcas.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/12/21/two-new-features-for-orcas.aspx"&gt;mentioned previously&lt;/A&gt;&amp;nbsp;for Code Analysis, you will also see the following new analysis in this CTP:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;New Rules:&lt;/STRONG&gt;&lt;BR&gt;Reliability\AvoidCallingProblematicMethods &lt;BR&gt;Globalization\SpecifyStringComparision&lt;BR&gt;Globalization\NormalizeStringsToUppercase&lt;BR&gt;Globalization\UseOrdinalStringComparion&lt;BR&gt;Design\DoNotRaiseExceptionsInUnexpectedLocations&lt;BR&gt;Usage\DoNotRaiseExceptionsInExceptionClauses&lt;BR&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Changes to Existing Rules:&lt;/STRONG&gt;&lt;BR&gt;IdentifiersShouldHaveCorrectPrefix&lt;BR&gt;&amp;nbsp;- Now fires on generic type parameters that do not begin with 'T'&lt;BR&gt;&lt;BR&gt;CompoundWordsShouldBeCasedCorrectly&lt;BR&gt;IdentifiersShouldBeCasedCorrectly&amp;nbsp; &lt;BR&gt;UsePreferredTerms&lt;BR&gt;ShortAcronymsShouldBeUppercase &lt;BR&gt;LongAcronymsShouldBePascalCased &lt;BR&gt;IdentifiersShouldNotContainUnderscores&amp;nbsp;&lt;BR&gt;&amp;nbsp;- Now fire on assemblies (with externally visible types) and generic type parameters&lt;/P&gt;
&lt;P mce_keep="true"&gt;You will also see a string of better analysis and less noise in existing rules when compared to both Visual Studio 2005 and FxCop 1.35.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Download it today and tell us what you think!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1449980" 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/Releases/default.aspx">Releases</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></item><item><title>And now back to your regularly scheduled FxCop documentation...</title><link>http://blogs.msdn.com/fxcop/archive/2007/01/06/and-now-back-to-your-regularly-scheduled-fxcop-documentation.aspx</link><pubDate>Sun, 07 Jan 2007 04:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1410095</guid><dc:creator>David M. Kean</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/fxcop/comments/1410095.aspx</comments><wfw:commentRss>http://blogs.msdn.com/fxcop/commentrss.aspx?PostID=1410095</wfw:commentRss><wfw:comment>http://blogs.msdn.com/fxcop/rsscomments.aspx?PostID=1410095</wfw:comment><description>&lt;P&gt;As&amp;nbsp;&lt;EM&gt;a lot&lt;/EM&gt; of you noticed, just before Christmas all of our rule documentation links broke&amp;nbsp;from within FxCop. Unfortunately, due to the timing (and with the required people on holidays),&amp;nbsp;we could not get this fixed as soon as we had hoped. &lt;/P&gt;
&lt;P&gt;However, as of&amp;nbsp;early&amp;nbsp;this week,&amp;nbsp;the documentation should be back up and running. We apologise profusely and hope that it did not cause you too much of an inconvenience.&lt;/P&gt;
&lt;P&gt;To those &lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=267624" mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=267624"&gt;that thought we were cutting FxCop&lt;/A&gt;, I can assure you that the standalone will be sticking around in the future. :)&lt;/P&gt;
&lt;P&gt;However,&amp;nbsp;there&amp;nbsp;is good news out of this; the &lt;A class="" href="http://blogs.msdn.com/msdnwiki/" mce_href="http://blogs.msdn.com/msdnwiki/"&gt;MSDN Wiki Team&lt;/A&gt; have moved the&amp;nbsp;MSDN&amp;nbsp;wiki feature&amp;nbsp;across to the main &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/default.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/default.aspx"&gt;MSDN2&lt;/A&gt;&amp;nbsp;Library. The even better news, is that now Visual Studio users (&lt;A class="" href="http://blogs.msdn.com/fxcop/archive/2006/06/12/tip-get-more-information-about-a-rule-warning-within-visual-studio-david-kean.aspx" mce_href="http://blogs.msdn.com/fxcop/archive/2006/06/12/tip-get-more-information-about-a-rule-warning-within-visual-studio-david-kean.aspx"&gt;if they have enabled&amp;nbsp;live MSDN&lt;/A&gt;) can now&amp;nbsp;view, edit and add&amp;nbsp;these community blocks from within their Visual Studio help viewer. And with 33% of our &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ee1hzekz(VS.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ee1hzekz(VS.80).aspx"&gt;rule topics&lt;/A&gt;&amp;nbsp;already with at least 1 community content block,&amp;nbsp; check it out!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1410095" 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/Documentation/default.aspx">Documentation</category><category domain="http://blogs.msdn.com/fxcop/archive/tags/FxCop/default.aspx">FxCop</category></item></channel></rss>