<?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/"
	>

<channel>
	<title>dotnet thoughts &#187; C#.Net</title>
	<atom:link href="http://www.dotnetthoughts.net/tag/c-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetthoughts.net</link>
	<description>a dotnet developer&#039;s technical blog</description>
	<lastBuildDate>Thu, 02 Feb 2012 03:18:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to write an NUnit Addin</title>
		<link>http://www.dotnetthoughts.net/2012/01/23/how-to-write-an-nunit-addin/</link>
		<comments>http://www.dotnetthoughts.net/2012/01/23/how-to-write-an-nunit-addin/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 04:51:09 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[NUnit AddIn]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2309</guid>
		<description><![CDATA[From version 2.2.x NUnit supports AddIns. Addins can customize NUnit’s internal behavior such as the creation of tests and their execution. An Addin should to implement the interface NUnit.Core.Extensibility.IAddin, which can be found in the assembly nunit.core.interfaces. Also the NUnit.Core.Extensibility.NUnitAddinAttribute &#8230; <a href="http://www.dotnetthoughts.net/2012/01/23/how-to-write-an-nunit-addin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">From version 2.2.x NUnit supports AddIns. Addins can customize NUnit’s internal behavior such as the creation of tests and their execution. An Addin should to implement the interface <em>NUnit.Core.Extensibility.IAddin</em>, which can be found in the assembly <em>nunit.core.interfaces</em>. Also the <em>NUnit.Core.Extensibility.NUnitAddinAttribute</em> must be applied to Addin class. The attribute parameters Name and Description represent the name of the extension and a description of what it does. The NUnit.Core.Extensibility.IAddin has only one method, Install(). The Install method is called by each host for which the addin has specified an ExtensionType. The addin should check that the necessary extension points are available and install itself, returning true for success or false for failure to install. The method will be called once for each extension host and &#8211; for Core extensions &#8211; each time a new test domain is loaded. Here is a minimal addin.</p>
<pre class="brush: csharp; title: ; notranslate">
namespace SampleAddIn
{
    using NUnit.Core.Extensibility;

    [NUnitAddin(Name = &quot;SampleAddIn&quot;, Description = &quot;This is a Sample AddIn&quot;)]
    public class SampleNUnitAddin : IAddin
    {
        #region IAddin Members

        public bool Install(IExtensionHost host)
        {
            return true;
        }

        #endregion
    }
}
</pre>
<p>You can install the Addin, by copying the assembly to bin\Addins folder, relative to NUnit installation directory. You can verify your addin by starting NUnit, Tools &gt; Addins menu.</p>
<div id="attachment_2311" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-2311" title="Registered AddIns Dialog" src="http://www.dotnetthoughts.net/wp-content/uploads/2012/01/nunit_addin-300x258.jpg" alt="Registered AddIns Dialog" width="300" height="258" /><p class="wp-caption-text">Registered AddIns Dialog</p></div>
<p>This Addin does nothing. It simply registers itself to NUnit. You can more details about NUnit Addins <a href="http://nunit.org/index.php?p=nunitAddins&amp;r=2.6">here</a><br />
If you are using VS2010, then please make sure your target framework is .Net 2.0. Otherwise Addin won&#8217;t work.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/01/05/how-to-compare-equality-between-two-objects-in-nunit/" title="Permanent link to How to compare equality between two objects in NUnit">How to compare equality between two objects in NUnit</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/11/02/debugging-nunit-tests-in-visual-studio-2010/" title="Permanent link to Debugging NUnit Tests in Visual Studio 2010">Debugging NUnit Tests in Visual Studio 2010</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/12/23/how-to-do-code-coverage-with-nunit-tests/" title="Permanent link to How to do code coverage with NUnit tests">How to do code coverage with NUnit tests</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/12/15/how-to-integrate-nunit-with-visual-studio-2008/" title="Permanent link to How to integrate Nunit with Visual Studio 2008">How to integrate Nunit with Visual Studio 2008</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/09/25/getting-code-coverage-using-open-cover-and-nunit/" title="Permanent link to Getting Code coverage using Open Cover and NUnit">Getting Code coverage using Open Cover and NUnit</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2012/01/23/how-to-write-an-nunit-addin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use .Net assembly in VBScript</title>
		<link>http://www.dotnetthoughts.net/2012/01/11/how-to-use-net-assembly-in-vbscript/</link>
		<comments>http://www.dotnetthoughts.net/2012/01/11/how-to-use-net-assembly-in-vbscript/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:31:45 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 3.0 / 3.5]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[RegAsm]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2243</guid>
		<description><![CDATA[Few days before I got a requirement to use a .Net assembly in VBScript, but it was not working. But today I got the solution. It was related to my 64bit OS. In this post I am discussing how to &#8230; <a href="http://www.dotnetthoughts.net/2012/01/11/how-to-use-net-assembly-in-vbscript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Few days before I got a requirement to use a .Net assembly in VBScript, but it was not working. But today I got the solution. <strong>It was related to my 64bit OS</strong>. <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  In this post I am discussing how to create and use a .net assembly in VBScript or Javascript.</p>
<p style="text-align: justify;">First we need to create a class library. Set the ComVisible attribute to true in the AssemblyInfo.cs manually.</p>
<pre class="brush: csharp; title: ; notranslate">
[assembly: ComVisible(true)]
</pre>
<p style="text-align: justify;">Or you can do it using Properties &gt; Application Tab and select Assembly Information, from the Assembly Information dialog, Check the Make assembly COM-Visible check box.</p>
<div id="attachment_2249" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-2249" title="Make Assembly COM Visible option from Assembly Information dialog" src="http://www.dotnetthoughts.net/wp-content/uploads/2012/01/make_com_visible-300x140.jpg" alt="Make Assembly COM Visible option from Assembly Information dialog" width="300" height="140" /><p class="wp-caption-text">Make Assembly COM Visible option from Assembly Information dialog</p></div>
<p style="text-align: justify;">Build the assembly. Now we need register the assembly. We can do it using RegAsm.exe. <strong>If your OS in 64 bit, then you need to use Regasm command from Framework64 folder(Normally it will be C:\Windows\Microsoft.NET\Framework64\ folder).</strong> For running RegAsm command it is recommended to sign the assembly. You can Sign the assembly Properties &gt; Signing Tab.</p>
<div id="attachment_2250" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-2250" title="Sign Assembly option" src="http://www.dotnetthoughts.net/wp-content/uploads/2012/01/sign_assembly-300x97.jpg" alt="Sign Assembly option" width="300" height="97" /><p class="wp-caption-text">Sign Assembly option</p></div>
<p style="text-align: justify;">As RegAsm command add / update information to Windows Registry, you need to run the RegAsm command as Administrator, otherwise it will not work.</p>
<p>You can register the assembly using following command, like this</p>
<pre class="brush: plain; title: ; notranslate">
regasm /codebase assemblyname.dll
</pre>
<p>You can unregister the assembly using RegAsm command, like this</p>
<pre class="brush: plain; title: ; notranslate">
regasm /u assemblyname.dll
</pre>
<p>That&#8217;s it. Now you can create the object of the .net assembly in VBScript. Like this, it will add 10 and 20 using C# Add method and returns the value.</p>
<pre class="brush: vb; title: ; notranslate">
Dim calcLib
Set calcLib = CreateObject(&quot;CalcLib.Math&quot;)
Dim result
result = calcLib.Add (10 , 20)
msgbox result
</pre>
<p>And here is the C# Class, which we are invoked from VBScript.</p>
<pre class="brush: csharp; title: ; notranslate">
namespace CalcLib
{
    public class Math
    {
        public int Add(int number1, int number2)
        {
            return number1 + number2;
        }
    }
}
</pre>
<p>Happy Coding <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2009/01/30/finding-types-in-a-running-program/" title="Permanent link to Finding types in a Running Program">Finding types in a Running Program</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2012/02/01/the-application-has-failed-to-start-because-its-side-by-side-configuration-is-incorrect-please-see-the-application-event-log-or-use-the-command-line-sxstrace-exe-tool-for-more-detail/" title="Permanent link to The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail">The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/09/21/how-measure-get-code-coverage-by-partcover-with-mstest/" title="Permanent link to How measure get code coverage by PartCover with MSTest">How measure get code coverage by PartCover with MSTest</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/11/12/how-redirect-output-from-a-console-application/" title="Permanent link to How redirect output from a console application">How redirect output from a console application</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/12/22/net-framework-initialization-error-%e2%80%93-unable-to-find-a-version-of-the-runtime-to-run-this-application/" title="Permanent link to .Net Framework Initialization Error – Unable to find a version of the runtime to run this application">.Net Framework Initialization Error – Unable to find a version of the runtime to run this application</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2012/01/11/how-to-use-net-assembly-in-vbscript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to configure a WCF service to use Port Sharing</title>
		<link>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/</link>
		<comments>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 02:46:15 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[.Net 3.0 / 3.5]]></category>
		<category><![CDATA[.Net 4.0]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Port Sharing]]></category>
		<category><![CDATA[WCF Port sharing]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2162</guid>
		<description><![CDATA[Windows Communication Foundation (WCF) provides a new TCP-based network protocol (net.tcp://) for high-performance communication. WCF also introduces a new system component, the Net.TCP Port Sharing Service that enables net.tcp ports to be shared across multiple user processes. Yesterday I got &#8230; <a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Windows Communication Foundation (WCF) provides a new TCP-based network protocol (net.tcp://) for high-performance communication. WCF also introduces a new system component, the Net.TCP Port Sharing Service that enables net.tcp ports to be shared across multiple user processes. Yesterday I got a chance to work on the same, I thought it was complex. But it is very simple in WCF, only we need to modify the <strong>PortSharingEnabled</strong> property of the NetTcpBinding. Like the following</p>
<pre class="brush: csharp; title: ; notranslate">
string baseAddress = &quot;net.tcp://localhost:8080/MyService1&quot;;
Uri[] addresses = { new Uri(baseAddress) };
using (var serviceHost = new ServiceHost(typeof(Service), addresses))
{
    var nettcpbinding = new NetTcpBinding();
    nettcpbinding.PortSharingEnabled = true;
    serviceHost.AddServiceEndpoint(typeof(IService),
        nettcpbinding, &quot;IService&quot;);

    serviceHost.Open();
    Console.ReadKey(true);
    serviceHost.Close();
}
</pre>
<p style="text-align: justify;">Also even if set the PortSharingEnabled to true, we also require to start the <strong>Net.Tcp port sharing service</strong> from the control panel. By default it will be disabled. If the service not started, and your tried to listen two services in same port number, you may get an exception like this <em>AddressAlreadyInUseException &#8211; There is already a listener on IP endpoint 0.0.0.0:8080. This could happen if there is another application already listening on this endpoint or if you have multiple service endpoints in your service host with the same IP endpoint but with incompatible binding configurations</em>.</p>
<div id="attachment_2168" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/dotnetthoughts_services/" rel="attachment wp-att-2168"><img class="size-medium wp-image-2168" title="Net.Tcp port sharing service in Services console." src="http://www.dotnetthoughts.net/wp-content/uploads/2011/12/dotnetthoughts_services-300x144.jpg" alt="Net.Tcp port sharing service in Services console." width="300" height="144" /></a><p class="wp-caption-text">Net.Tcp port sharing service in Services console.</p></div>
<p>You can also set the property via App.Config file also.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;bindings&gt;
    &lt;netTcpBinding&gt;
        &lt;binding portSharingEnabled=&quot;true&quot; /&gt;
    &lt;/netTcpBinding&gt;
&lt;/bindings&gt;
</pre>
<p>Now you are able to run two services with same port number, in this port number 8080.</p>
<p>Happy Programming <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/06/24/wcf-callbacks-%e2%80%93-a-quick-introduction/" title="Permanent link to WCF Callbacks – A quick introduction">WCF Callbacks – A quick introduction</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/03/20/how-to-create-restful-wcf-services/" title="Permanent link to How to create RESTful WCF services">How to create RESTful WCF services</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2012/01/22/how-to-add-mex-endpoints-programmatically/" title="Permanent link to How to add MEX endpoints programmatically">How to add MEX endpoints programmatically</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/11/18/how-to-create-a-rss-feed-using-asp-net/" title="Permanent link to How to create a RSS feed using ASP.Net">How to create a RSS feed using ASP.Net</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/11/25/raven-db-introduction/" title="Permanent link to Raven DB &#8211; Introduction">Raven DB &#8211; Introduction</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/12/26/how-to-configure-a-wcf-service-to-use-port-sharing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MSTest.exe does not deploy all items</title>
		<link>http://www.dotnetthoughts.net/2011/11/22/mstest-exe-does-not-deploy-all-items/</link>
		<comments>http://www.dotnetthoughts.net/2011/11/22/mstest-exe-does-not-deploy-all-items/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 17:32:29 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[DeploymentItem]]></category>
		<category><![CDATA[MSTes]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2102</guid>
		<description><![CDATA[Today while working on some regression build issues, me and my lead noticed one problem with MS Tests, we are running MSTest.exe from commandline to execute few tests. The problem was MSTest.exe was is not copying all the referenced assemblies &#8230; <a href="http://www.dotnetthoughts.net/2011/11/22/mstest-exe-does-not-deploy-all-items/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_2105" class="wp-caption alignleft" style="width: 310px"><a href="http://www.dotnetthoughts.net/2011/11/22/mstest-exe-does-not-deploy-all-items/mstest_commandline/" rel="attachment wp-att-2105"><img class="size-medium wp-image-2105" title="MS Test running command line" src="http://www.dotnetthoughts.net/wp-content/uploads/2011/11/mstest_commandline-300x153.jpg" alt="MS Test running command line" width="300" height="153" /></a><p class="wp-caption-text">MS Test running command line</p></div>
<p style="text-align: justify;">Today while working on some regression build issues, me and my lead noticed one problem with MS Tests, we are running MSTest.exe from commandline to execute few tests. The problem was MSTest.exe was is not copying all the referenced assemblies to the Out folder, and this is causing failures. We initially thought the issue with commandline MSTest.exe, because all these test cases were running fine, when we run same using Visual Studio IDE. All the required assemblies are referenced to the test project, because of that we didn&#8217;t tried the DeploymentItem attribute. We tried the various MSTest commandline switches, but nothing worked. Later we found the issue, it was because of the referenced assemblies was not being used in the test. The problem fixed by creating instance of the all required assemblies in the test cases.</p>
<p style="text-align: justify;">Thanks to Raghu <img src='http://www.dotnetthoughts.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Happy unit testing.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2012/01/18/how-to-execute-ms-tests-in-parallel-on-multi-cpu-core-machines/" title="Permanent link to How to execute ms tests in parallel on multi-cpu / core machines">How to execute ms tests in parallel on multi-cpu / core machines</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2010/12/23/how-to-do-code-coverage-with-nunit-tests/" title="Permanent link to How to do code coverage with NUnit tests">How to do code coverage with NUnit tests</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/03/08/unit-test-adapter-threw-exception-unable-to-load-one-or-more-of-the-requested-types/" title="Permanent link to Unit Test Adapter threw exception &#8211; Unable to load one or more of the requested types">Unit Test Adapter threw exception &#8211; Unable to load one or more of the requested types</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/09/25/getting-code-coverage-using-open-cover-and-nunit/" title="Permanent link to Getting Code coverage using Open Cover and NUnit">Getting Code coverage using Open Cover and NUnit</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/09/21/how-measure-get-code-coverage-by-partcover-with-mstest/" title="Permanent link to How measure get code coverage by PartCover with MSTest">How measure get code coverage by PartCover with MSTest</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/11/22/mstest-exe-does-not-deploy-all-items/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to debug Windows Live Writer plugins</title>
		<link>http://www.dotnetthoughts.net/2011/11/20/how-to-debug-windows-live-writer-plugins/</link>
		<comments>http://www.dotnetthoughts.net/2011/11/20/how-to-debug-windows-live-writer-plugins/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 09:29:07 +0000</pubDate>
		<dc:creator>Anuraj P</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Forms]]></category>
		<category><![CDATA[C#.Net]]></category>
		<category><![CDATA[Live Writer Plugin]]></category>
		<category><![CDATA[Windows Live Writer]]></category>

		<guid isPermaLink="false">http://www.dotnetthoughts.net/?p=2042</guid>
		<description><![CDATA[This is final post related to live writer plugins and its about debugging the Live writer plugins. While developing I don&#8217;t think there is a way we can debug the plugin code. This is after deployment. Initially I faced one &#8230; <a href="http://www.dotnetthoughts.net/2011/11/20/how-to-debug-windows-live-writer-plugins/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This is final post related to live writer plugins and its about debugging the Live writer plugins. While developing I don&#8217;t think there is a way we can debug the plugin code. This is after deployment. Initially I faced one issue with options dialog, it was related to object reference issue, I got a message like this.</p>
<div id="attachment_2044" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dotnetthoughts.net/wp-content/uploads/2011/11/plugin_settings_error.jpg"><img class="size-medium wp-image-2044" title="Plug-in Error occured - Messagebox from Windows Live Writer" src="http://www.dotnetthoughts.net/wp-content/uploads/2011/11/plugin_settings_error-300x197.jpg" alt="Plug-in Error occured - Messagebox from Windows Live Writer" width="300" height="197" /></a><p class="wp-caption-text">Plug-in Error occured - Messagebox from Windows Live Writer</p></div>
<p style="text-align: justify;">It only shows the exception message, not the stack trace or any other information which helps to find the exception. For debugging, you need to attach the Windows Live writer to Visual Studio(we may need to run visual studio as Administrator) using Attach Process feature of Visual Studio from Debug menu.</p>
<div id="attachment_2043" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.dotnetthoughts.net/wp-content/uploads/2011/11/attachprocess.jpg"><img class="size-medium wp-image-2043" title="Attach Windows Live Writer to Visual Studio" src="http://www.dotnetthoughts.net/wp-content/uploads/2011/11/attachprocess-300x190.jpg" alt="Attach Windows Live Writer to Visual Studio" width="300" height="190" /></a><p class="wp-caption-text">Attach Windows Live Writer to Visual Studio</p></div>
<p>Happy Programming.</p>
<div class="betterrelated"><p><strong>Related content:</strong></p>
<ol><li> <a href="http://www.dotnetthoughts.net/2011/11/16/how-to-create-a-windows-live-writer-plugin-using-c-part-1/" title="Permanent link to How to create a Windows Live writer plugin using C# Part 1">How to create a Windows Live writer plugin using C# Part 1</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/11/19/how-to-create-a-windows-live-writer-plugin-using-c-part-2/" title="Permanent link to How to create a Windows Live writer plugin using C# Part 2">How to create a Windows Live writer plugin using C# Part 2</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/08/03/windows-7-sdk-installation-success-or-error-status-1603/" title="Permanent link to Windows 7 SDK Installation success or error status: 1603">Windows 7 SDK Installation success or error status: 1603</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2011/06/02/how-to-integrate-fxcop-to-visual-studio-2010-professional/" title="Permanent link to How to integrate FxCop to Visual Studio 2010 Professional">How to integrate FxCop to Visual Studio 2010 Professional</a>  </li>
<li> <a href="http://www.dotnetthoughts.net/2009/06/18/debugging-windows-services/" title="Permanent link to Debugging Windows Services">Debugging Windows Services</a>  </li>
</ol></div>]]></content:encoded>
			<wfw:commentRss>http://www.dotnetthoughts.net/2011/11/20/how-to-debug-windows-live-writer-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

