<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dave Jansen's Blog &#187; Visual Studio</title>
	<atom:link href="http://dansen.wordpress.com/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://dansen.wordpress.com</link>
	<description>Thoughts... Words... Stories... Experiences...</description>
	<lastBuildDate>Wed, 25 Jun 2008 23:32:53 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dansen.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/e960aec7a4a664225f78efe5b222056e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Dave Jansen's Blog &#187; Visual Studio</title>
		<link>http://dansen.wordpress.com</link>
	</image>
			<item>
		<title>Suppressing Code Analysis Rules</title>
		<link>http://dansen.wordpress.com/2008/04/15/suppressing-code-analysis-rules/</link>
		<comments>http://dansen.wordpress.com/2008/04/15/suppressing-code-analysis-rules/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 15:13:45 +0000</pubDate>
		<dc:creator>dansen</dc:creator>
				<category><![CDATA[Code Analysis]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://dansen.wordpress.com/2008/04/15/suppressing-code-analysis-rules/</guid>
		<description><![CDATA[I&#8217;ve been using Code Analysis (FxCop) for a few months now and every now and then I come across a CA rule that I my solution violates. In 99% of situations, I comply to all the CA rules. In a previous post, I could not satisfy the CA1304 rule. Spelling checks is also another area [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=41&subd=dansen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been using Code Analysis (FxCop) for a few months now and every now and then I come across a CA rule that I my solution violates. In 99% of situations, I comply to all the CA rules. In a previous <a href="http://dansen.wordpress.com/2008/04/09/code-analysis-ca1304-must-call-faultreasonfaultreasonstring-cultureinfo/">post</a>, I could not satisfy the CA1304 rule. Spelling checks is also another area where CA rules fail all the time.</p>
<p>The process that I use for checking in code to TFS ensures that Code Analysis is run before hand and that the project setting &#8220;Treat Warnings as Errors&#8221; is set to true. This means that the CA rules that I want to ignore fail my project build.</p>
<p>There are several ways to get around this:</p>
<p>1. Don&#8217;t use CA &#8211; <em>not an option for me.<br />
</em>2. Don&#8217;t treat warnings as errors &#8211; <em>not an option for me.<br />
</em>3. Apply a Suppression &#8220;In Source&#8221;- <em>an option.<br />
</em>4. Apply a Suppression in &#8220;Project Suppression File (GlobalSuppression.cs) &#8211; <em>an ideal option</em>.</p>
<p>The last two options are my choice. Suppressing a CA rule places an attribute in code that informs FxCop to ignore the rule and therefore not raise a Warning or an Error.</p>
<h3>Example Rule Failures</h3>
<p>The following CA rules came up as Warnings for my solution. Both Suppress options are available. CA1304 gives two suppression options where as CA2210 (strong name key required) only allows a Project suppression because it is applied only at the assembly level. For a full list of the CA rules shipped with each version of VS/FxCop see this <a href="http://blogs.msdn.com/fxcop/archive/2008/01/07/faq-which-rules-shipped-in-which-version.aspx">post</a>.</p>
<p><a href="http://dansen.files.wordpress.com/2008/04/image4.png"><img style="border-width:0;" src="http://dansen.files.wordpress.com/2008/04/image-thumb4.png?w=523&#038;h=399" border="0" alt="image" width="523" height="399" /></a></p>
<h3>In Source Suppression</h3>
<p>When available, a CA rule can suppressed in the source code where the rule failed. Use the <strong>SuppressMessageAttribute </strong>to disable the CA rule.</p>
<pre>[<span style="color:#2b91af;">SuppressMessage</span>(<span style="color:#a31515;">"Microsoft.Globalization"</span>, <span style="color:#a31515;">"CA1304:SpecifyCultureInfo"</span>,
MessageId = <span style="color:#a31515;">"System.ServiceModel.FaultReason.#ctor(System.String)"</span>)]
<span style="color:blue;">public void </span>ProvideFault(<span style="color:#2b91af;">Exception </span>error,
<span style="color:#2b91af;">MessageVersion </span>version,
<span style="color:blue;">ref </span><span style="color:#2b91af;">Message </span>fault)
{
<span style="color:green;">// Return a 'ServiceFault' Fault Contract
</span><span style="color:#2b91af;">ServiceFault </span>faultDetail = <span style="color:blue;">new </span><span style="color:#2b91af;">ServiceFault</span>(<span style="color:#a31515;">"An error occured"</span>);

<span style="color:green;">// Construct FaultException with Fault Contract and FaultReason
</span><span style="color:#2b91af;">FaultException</span>&lt;<span style="color:#2b91af;">ServiceFault</span>&gt; faultException =
<span style="color:blue;">new </span><span style="color:#2b91af;">FaultException</span>&lt;<span style="color:#2b91af;">ServiceFault</span>&gt;(faultDetail,
<span style="color:blue;">new </span><span style="color:#2b91af;">FaultReason</span>(<span style="color:#a31515;">"FaultReasonText"</span>));
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>The benefit of applying the rule override in the source, is that code reviewers can easily see where the attribute has been placed. An additional file is is not required. The disadvantages is that you must apply the the attribute for every rule failure even if they are the same failures across multiple operations in the same code file and multiple code files. It also dirties the code with an messy attributes.</p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h3>Project Suppressions</h3>
<p>When selecting the Project Supressions File option, the <strong>SuppressMessageAttribute</strong> is placed in the projects GlobalSuppressions.cs file &#8211; Visual Studio will create one automatically. The attribute has overrides which allows you to target the exact place of the rule failure such as a class, method, field, namespace etc.</p>
<p>In my example, I have suppressed botth CA2210 and CA1304 rules in the GlobalSuppressions.cs. Visual Studio generates the code.</p>
<pre><span style="color:green;">// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
//
// To add a suppression to this file, right-click the message in the
// Error List, point to "Suppress Message(s)", and click
// "In Project Suppression File".
// You do not need to add suppressions to this file manually.

</span><span style="color:blue;">using </span>System.Diagnostics.CodeAnalysis;

[<span style="color:blue;">assembly</span>: <span style="color:#2b91af;">SuppressMessage</span>(
<span style="color:#a31515;">"Microsoft.Design"</span>,
<span style="color:#a31515;">"CA2210:AssembliesShouldHaveValidStrongNames"</span>)]

[<span style="color:blue;">assembly</span>:
<span style="color:#2b91af;">SuppressMessage</span>(
<span style="color:#a31515;">"Microsoft.Globalization"</span>, <span style="color:#a31515;">"CA1304:SpecifyCultureInfo"</span>,
MessageId = <span style="color:#a31515;">"System.ServiceModel.FaultReason.#ctor(System.String)"</span>,
Scope = <span style="color:#a31515;">"member"</span>,
Target = <span style="color:#a31515;">"Wcf.Demo.Service.ErrorHandler.#ProvideFault(System.Exception,System.ServiceModel.Channels.MessageVersion,System.ServiceModel.Channels.Message&amp;)"
</span>)]</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Notice the the CA1304 suppression contains Scope and Target properties. This can be changed so that the suppression is scoped to a wider code base such a a namespace.</p>
<p>The benefits of project suppressions is cleaner code, less duplication of the SuppressMessage attribute and easier to remove if failure is fixed. It&#8217;s also easier to code review as all failure overrides are in the one place. The only disadvantage that I can see is that there is an additional code file.</p>
<p>My preference is to always use project suppressions. In the near future , I will discuss some of the processes of how I use Code Analysis.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dansen.wordpress.com/41/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dansen.wordpress.com/41/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dansen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dansen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dansen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dansen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dansen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dansen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dansen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dansen.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dansen.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dansen.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=41&subd=dansen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dansen.wordpress.com/2008/04/15/suppressing-code-analysis-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2613ce2237e8235db55cafe47bd9ce1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dave</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/image-thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Debugging WCF Clients and Services</title>
		<link>http://dansen.wordpress.com/2008/04/15/debugging-wcf-clients-and-services/</link>
		<comments>http://dansen.wordpress.com/2008/04/15/debugging-wcf-clients-and-services/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 14:09:20 +0000</pubDate>
		<dc:creator>dansen</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://dansen.wordpress.com/2008/04/15/debugging-wcf-clients-and-services/</guid>
		<description><![CDATA[Debugging WCF services from the client through to the service is much easier when attaching the debugger to either the service or both the client and the service.
In the past, I have debugged services by firing up the client application and manually attaching to the WCF Service Host &#8211; which in this case is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=38&subd=dansen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Debugging WCF services from the client through to the service is much easier when attaching the debugger to either the service or both the client and the service.</p>
<p>In the past, I have debugged services by firing up the client application and manually attaching to the WCF Service Host &#8211; which in this case is the ASP.NET worker process. This process is quite cumbersome.</p>
<p>Visual Studio has feature that supports attaching to multiple projects when starting up.&nbsp; </p>
<p>In this example, I have a WCF service hosted in IIS which lives in the Wcf.Demo.IisServiceHost project. I also have a Wcf.Demo.TestHarness project which calls the service. I want to be able to attach the debugger to both the client and service by simply pressing F5.</p>
<h3>Steps</h3>
<p>1. Right click on the solution and select &#8220;<em><strong>Set StartUp Projects&#8230;</strong></em>&#8220;.</p>
<p><a href="http://dansen.files.wordpress.com/2008/04/image.png"><img style="border-width:0;" border="0" alt="image" src="http://dansen.files.wordpress.com/2008/04/image-thumb.png?w=296&#038;h=176" width="296" height="176"></a></p>
<p>2. In the StartUp tab, select &#8220;<strong><em>Multiple startup projects</em></strong>&#8221; and select the projects you want to start up. </p>
<p>3. On the Action of the selected projects, select &#8220;Start&#8221; to start with the debugger attached. </p>
<p><a href="http://dansen.files.wordpress.com/2008/04/image1.png"><img style="border-width:0;" border="0" alt="image" src="http://dansen.files.wordpress.com/2008/04/image-thumb1.png?w=455&#038;h=313" width="455" height="313"></a></p>
<p>If you now run (F5) the application, it will fire up both the Test Harness and a Internet browser to the service virtual directory. You can disable this.</p>
<p>4. Go to the Web project properties for the WCF web project and select &#8220;<strong><em>Don&#8217;t open a page</em></strong>&#8220;.</p>
<p>&nbsp;<a href="http://dansen.files.wordpress.com/2008/04/image2.png"><img style="border-width:0;" border="0" alt="image" src="http://dansen.files.wordpress.com/2008/04/image-thumb2.png?w=556&#038;h=312" width="556" height="312"></a></p>
<p>Now when you hit F5, the test harness will launch and the debugger will be attached to both processes.</p>
<p><a href="http://dansen.files.wordpress.com/2008/04/image3.png"><img style="border-width:0;" border="0" alt="image" src="http://dansen.files.wordpress.com/2008/04/image-thumb3.png?w=695&#038;h=344" width="695" height="344"></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dansen.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dansen.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dansen.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dansen.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dansen.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dansen.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dansen.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dansen.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dansen.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dansen.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dansen.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dansen.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=38&subd=dansen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dansen.wordpress.com/2008/04/15/debugging-wcf-clients-and-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2613ce2237e8235db55cafe47bd9ce1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dave</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/image-thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/image-thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>CA1304 &#8211; Must specify CultureInfo when using FaultReason</title>
		<link>http://dansen.wordpress.com/2008/04/09/code-analysis-ca1304-must-specify-cultureinfo-when-using-faultreason/</link>
		<comments>http://dansen.wordpress.com/2008/04/09/code-analysis-ca1304-must-specify-cultureinfo-when-using-faultreason/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 12:36:31 +0000</pubDate>
		<dc:creator>dansen</dc:creator>
				<category><![CDATA[Code Analysis]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://dansen.wordpress.com/2008/04/09/code-analysis-ca1304-must-call-faultreasonfaultreasonstring-cultureinfo/</guid>
		<description><![CDATA[Today I came across the following issue when running Code Analysis over my WCF Error Shielding solution.

Because I have &#8220;Treat Warnings as Errors&#8221; enabled for all projects, Code Analysis fails.
Rory Primrose has recently blogged a very nice Error Handling solution which have implemented in a WCF service. As soon as I implemented the solution and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=24&subd=dansen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I came across the following issue when running Code Analysis over my WCF Error Shielding solution.</p>
<p><a href="http://dansen.files.wordpress.com/2008/04/caerror.jpg"><img style="border-width:0;" src="http://dansen.files.wordpress.com/2008/04/caerror-thumb.jpg?w=822&#038;h=100" border="0" alt="CAError" width="822" height="100" /></a></p>
<p>Because I have &#8220;Treat Warnings as Errors&#8221; enabled for all projects, Code Analysis fails.</p>
<p><a href="http://neovolve.com/archive/2008/04/07/implementing-ierrorhandler.aspx">Rory Primrose</a> has recently blogged a very nice <a href="http://neovolve.com/archive/2008/04/07/implementing-ierrorhandler.aspx">Error Handling</a> solution which have implemented in a WCF service. As soon as I implemented the solution and specified to return a custom Fault Contract, WCF returned an exception indicating that the &#8220;<a href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.faultreason.aspx">FaultReason</a>&#8221; was not provided. So I constructed a new <a href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.faultreason.aspx">FaultReason</a>, and passed it in to the FaultException(Fault, FaultReason).</p>
<blockquote><p>The <span class="selflink">FaultReason</span> class contains a set of <a id="ctl00_rs1_mainContentContainer_ctl22" href="http://msdn2.microsoft.com/en-us/library/system.servicemodel.faultreasontext.aspx"><span style="color:#0066cc;">System.ServiceModel<span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span>FaultReasonText</span></a> objects, each of which contains a description of the fault in a specific language.</p></blockquote>
<p><strong>Sample</strong></p>
<p><!-- {\rtf1\ansi\ansicpg\lang1024\noproof65001\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red43\green145\blue175;\red0\green128\blue0;\red163\green21\blue21;}??\fs20 \cf1 public\cf0  \cf1 void\cf0  ProvideFault(\cf4 Exception\cf0  error, \cf4 MessageVersion\cf0  version, \cf1 ref\cf0  \cf4 Message\cf0  fault)\par ??\{\par ??    \cf5 // Return a 'ServiceFault' Fault Contract\par ??\cf0     \cf4 ServiceFault\cf0  faultDetail = \cf1 new\cf0  \cf4 ServiceFault\cf0 (\cf6 "An error occured"\cf0 );\par ??\par ??    \cf5 // Construct FaultException with FaultContract and FaultReason\par ??\cf0     \cf4 FaultException\cf0 &amp;lt;\cf4 ServiceFault\cf0 &amp;gt; faultException = \par ??        \cf1 new\cf0  \cf4 FaultException\cf0 &amp;lt;\cf4 ServiceFault\cf0 &amp;gt;(faultDetail, \cf1 new\cf0  \cf4 FaultReason\cf0 (\cf6 "FaultReasonText"\cf0 ));\par ??\par ??    \cf4 MessageFault\cf0  messageFault = faultException.CreateMessageFault();\par ??\par ??    fault = \cf4 Message\cf0 .CreateMessage(version, messageFault, faultException.Action);\par ??\}} --></p>
<div style="background:white none repeat scroll 0;font-family:Courier New;font-size:8pt;color:black;">
<p style="margin:0;"><span style="color:blue;">public</span> <span style="color:blue;">void</span> ProvideFault(<span style="color:#2b91af;">Exception</span> error, <span style="color:#2b91af;">MessageVersion</span> version, <span style="color:blue;">ref</span> <span style="color:#2b91af;">Message</span> fault)</p>
<p style="margin:0;">{</p>
<p style="margin:0;"><span style="color:green;"> // Return a &#8216;ServiceFault&#8217; Fault Contract</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> ServiceFault</span> faultDetail = <span style="color:blue;">new</span> <span style="color:#2b91af;">ServiceFault</span>(<span style="color:#a31515;">&#8220;An error occured&#8221;</span>);</p>
<p style="margin:0;">
<p style="margin:0;"><span style="color:green;"><br />
// Construct FaultException with FaultContract and FaultReason</span></p>
<p style="margin:0;"><span style="color:#2b91af;"> FaultException</span>&lt;<span style="color:#2b91af;">ServiceFault</span>&gt; faultException =</p>
<p style="margin:0;"><span style="color:blue;"> new</span> <span style="color:#2b91af;">FaultException</span>&lt;<span style="color:#2b91af;">ServiceFault</span>&gt;(faultDetail, <span style="color:blue;">new</span> <span style="color:#2b91af;">FaultReason</span>(<span style="color:#a31515;">&#8220;FaultReasonText&#8221;</span>));</p>
<p style="margin:0;">
<p style="margin:0;"><span style="color:#2b91af;"><br />
MessageFault</span> messageFault = faultException.CreateMessageFault();</p>
<p style="margin:0;">
<p>fault = <span style="color:#2b91af;">Message</span>.CreateMessage(version, messageFault, faultException.Action);</p>
<p style="margin:0;">}</p>
</div>
<p><!--EndFragment--></p>
<p>I compiled the code in Debug which was successful. I then switched on Code Analysis and it raised CA1304 : Microsoft.Globalization. The Code Analysis rule made sense to ensure I was using CultureInfo for the reason text.</p>
<p>However, the FaultReason does not provide any <strong>&#8216;public</strong>&#8216; constructor overrides to accept the CultureInfo. It does however provide an internal FaultReason(string text, CultureInfo cultureInfo) constructor.</p>
<p><a href="http://dansen.files.wordpress.com/2008/04/faultreason.jpg"><img style="border-width:0;" src="http://dansen.files.wordpress.com/2008/04/faultreason-thumb.jpg?w=678&#038;h=307" border="0" alt="FaultReason" width="678" height="307" /></a></p>
<p>After the help of <a href="http://neovolve.com/default.aspx">Rory</a> who confirmed with <a href="http://blogs.msdn.com/fxcop/">David Kean</a> from the <a href="http://blogs.msdn.com/fxcop/">Code Analysis Team</a> that this was a bug, I submitted feedback to <span style="font-size:11pt;font-family:'Calibri','sans-serif';color:#1f497d;"><a href="http://connect.microsoft.com/VisualStudio"><span style="color:#0000ff;">Microsoft Connect</span></a>.</span></p>
<p>You can keep track of this bug here: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=337431&amp;wa=wsignin1.0</p>
<p>In the meantime, I have suppressed this CA rule in my GlobalSupressions.cs for the project.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dansen.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dansen.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dansen.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dansen.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dansen.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dansen.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dansen.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dansen.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dansen.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dansen.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dansen.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dansen.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=24&subd=dansen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dansen.wordpress.com/2008/04/09/code-analysis-ca1304-must-specify-cultureinfo-when-using-faultreason/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2613ce2237e8235db55cafe47bd9ce1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dave</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/caerror-thumb.jpg" medium="image">
			<media:title type="html">CAError</media:title>
		</media:content>

		<media:content url="http://dansen.files.wordpress.com/2008/04/faultreason-thumb.jpg" medium="image">
			<media:title type="html">FaultReason</media:title>
		</media:content>
	</item>
		<item>
		<title>GhostDoc 2.1.1 Released</title>
		<link>http://dansen.wordpress.com/2007/07/04/ghostdoc-211-released/</link>
		<comments>http://dansen.wordpress.com/2007/07/04/ghostdoc-211-released/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 22:13:33 +0000</pubDate>
		<dc:creator>dansen</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://dansen.wordpress.com/2007/07/04/ghostdoc-211-released/</guid>
		<description><![CDATA[A new version of this useful Visual Studio code commenting plug-in has been released. It supports C# and VB.NET.
A few people have mentioned to me that they think that &#8220;GhostDocing&#8221; or auto commenting source code is a waste of time and does not provide any value comments because it fills code methods, properties, interfaces etc [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=7&subd=dansen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A new version of this useful Visual Studio code commenting plug-in has been released. It supports C# and VB.NET.</p>
<p>A few people have mentioned to me that they think that &#8220;GhostDocing&#8221; or auto commenting source code is a waste of time and does not provide any value comments because it fills code methods, properties, interfaces etc with default comments based on rules. Even though the rules provide some pretty cool results, they are still simple comments. There are thoughts that this is a waste of time only only meaningful comments should be written.</p>
<p>The reason I like using <a href="http://www.roland-weigelt.de/ghostdoc/">GhostDoc</a> so much is that it provides an accurate xml code comment template based on the method signature/template. I can then quickly edit the default comment with my own comments. Now what&#8217;s really cool is if I then refactor the method and change the signature around, add/remove parameters, swap them around, all I have to do is press Ctrl-Shift-D and <a href="http://www.roland-weigelt.de/ghostdoc/">GhostDoc</a> fixes up the code template. This saves a lot of time of mucking around with the XML comment.</p>
<p>The only feature that I think <a href="http://www.roland-weigelt.de/ghostdoc/">GhostDoc</a> is lacking is the ability to auto document an entire class. It only supports commenting elements one at a time.</p>
<p>See the blog entry here. <a href="http://weblogs.asp.net/rweigelt/archive/2007/07/03/3009402.aspx">GhostDoc 2.1.1 Released</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dansen.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dansen.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dansen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dansen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dansen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dansen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dansen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dansen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dansen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dansen.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dansen.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dansen.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=7&subd=dansen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dansen.wordpress.com/2007/07/04/ghostdoc-211-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2613ce2237e8235db55cafe47bd9ce1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dave</media:title>
		</media:content>
	</item>
		<item>
		<title>Wixaware 2.0 Beta</title>
		<link>http://dansen.wordpress.com/2007/06/26/wixaware-20-beta/</link>
		<comments>http://dansen.wordpress.com/2007/06/26/wixaware-20-beta/#comments</comments>
		<pubDate>Tue, 26 Jun 2007 05:52:12 +0000</pubDate>
		<dc:creator>dansen</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WiX]]></category>
		<category><![CDATA[Windows Installer]]></category>

		<guid isPermaLink="false">http://dansen.wordpress.com/2007/06/26/wixaware-20-beta/</guid>
		<description><![CDATA[InstallAware has just released a beta version for their upcoming 2.0 release. This release contains some anticipated bug fixes and support for external fragment and include files.
WixAware is a front end GUI for building Windows Installer XML (WiX) scripts. It&#8217;s not just a visual XML editor like other ones I have seen. It speeds up&#160;the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=6&subd=dansen&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.installaware.com">InstallAware</a> has just released a beta version for their upcoming 2.0 release. This release contains some anticipated bug fixes and support for external fragment and include files.</p>
<p><a href="http://www.wixaware.com">WixAware</a> is a front end GUI for building Windows Installer XML (<a href="http://wix.sourceforge.net/">WiX</a>) scripts. It&#8217;s not just a visual XML editor like other ones I have seen. It speeds up&nbsp;the process by providing templates for deployment projects, merge modules, and patch setups.</p>
<p>I have been trialling <a href="http://www.wixaware.com">Wixaware</a> 1.1 for a few weeks to help speed up the development of our <a href="http://wix.sourceforge.net/">WiX</a> projects. Version 1.1 was quite buggy but Version 2.0 seems to have most of the querks worked out.</p>
<p>I&#8217;ve created deployment projects in <a href="http://wix.sourceforge.net/">WiX</a> that deploy the following application types</p>
<ul>
<li>ASP.NET Web Sites
<li>ASP.NET Web Services
<li>C# Windows applications with COM registration of .NET and VB6
<li>Command line / Windows UI tools.</li>
</ul>
<p>The WiX scripts have been integrated into the continuous integration build process.</p>
<p>I still have to manually edit the WiX script to customize the way my installers work. <a href="http://www.wixaware.com">Wixaware</a> provides both a UI view with tree views, lists etc as well as the XML view.&nbsp; Vesion 2.0 now supports fragment and include files so I can move all of the UI parts and common properties into a separate file.</p>
<p>I&#8217;m still not fully convinced that WiX is the way to go &#8211; it seems a lot of steep learning just to produce a deployment project.&nbsp;Even with GUI editors, there is still much one needs to know to build WiX deployment packages. I have been building deployment projects&nbsp;on and off&nbsp;since 2000 with Visual Studio Deployment projects (MSI), <a href="http://www.jrsoftware.org/isinfo.php">Inno Setup</a> and Wix/Wixware (MSI). Are MSI installers really that good and efficient for developers to build?</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dansen.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dansen.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dansen.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dansen.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dansen.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dansen.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dansen.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dansen.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dansen.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dansen.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dansen.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dansen.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dansen.wordpress.com&blog=1210400&post=6&subd=dansen&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dansen.wordpress.com/2007/06/26/wixaware-20-beta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a2613ce2237e8235db55cafe47bd9ce1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Dave</media:title>
		</media:content>
	</item>
	</channel>
</rss>