<?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>Christophe Herreman &#187; .NET</title>
	<atom:link href="http://www.herrodius.com/blog/category/net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.herrodius.com/blog</link>
	<description>Thoughts from a software developer</description>
	<lastBuildDate>Thu, 10 Jun 2010 19:08:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Duplicate line command for Visual Studio</title>
		<link>http://www.herrodius.com/blog/52</link>
		<comments>http://www.herrodius.com/blog/52#comments</comments>
		<pubDate>Sat, 26 Aug 2006 16:13:49 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=52</guid>
		<description><![CDATA[One of the things I'm missing in Visual Studio is a keyboard shortcut to duplicate a line of code. I use this command alot in Eclipse/FDT (Ctrl+Shift+D) and once you get used to it, you can't live without it. After googling around for a moment, I found this VB code that does just that. The [...]]]></description>
			<content:encoded><![CDATA[<p><img id="image53" alt="Visual Studio 2005" src="http://www.herrodius.com/blog/wp-content/uploads/2006/08/visual_studio_2005_logo.gif" align="right" />One of the things I'm missing in Visual Studio is a keyboard shortcut to duplicate a line of code. I use this command alot in Eclipse/FDT (Ctrl+Shift+D) and once you get used to it, you can't live without it. After googling around for a moment, I found this VB code that does just that. The great thing is that in Visual Studio you can create your own macro and attach it to a keyboard shortcut.</p>
<div class="igBar"><span id="lvb-2"><a href="#" onclick="javascript:showPlainTxt('vb-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Visual Basic:</span>
<div id="vb-2">
<div class="vb">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Imports System</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Imports EnvDTE</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Imports EnvDTE80</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Imports System.<span style="color: #66cc66;">Diagnostics</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Public</span> Module DuplicateLastLineModule</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Sub</span> DuplicateLine<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">Dim</span> <span style="color: #b1b100;">line</span> <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">StartOfLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">EndOfLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #b1b100;">True</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">line</span> = DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">Text</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">EndOfLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">NewLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">StartOfLine</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">DTE.<span style="color: #66cc66;">ActiveDocument</span>.<span style="color: #66cc66;">Selection</span>.<span style="color: #66cc66;">Text</span> = <span style="color: #b1b100;">line</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">End</span> Module </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>To create the macro, just go to the macro explorer ("Tools->Macros->Macro Explorer" or Alt+F8) and copy paste the code in a new module.</p>
<p>NowÂ just assing a keyboard shortcut to it:</p>
<ol>
<li>go to Tools->Options...</li>
<li>under Environment, click Keyboard</li>
<li>in the "Show Commands Containing" textbox, enter "duplicate" (this according to the name you gave the module.)</li>
<li>you should now see the macro in the list below</li>
<li>choose "Text Editor" from the "Use new shortcut in" list</li>
<li>set focus in the "Press shortcut keys" textbox and hit the combination on the keyboard you whish to use for it (Ctrl+Shift+D in my case)</li>
<li>hit the "Assign" button</li>
<li>you should now see the shortcut in the "Shortcuts for selected command" textbox</li>
<li>hit the OK button</li>
</ol>
<p>And that's it. Enjoy !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/52/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ASP.NET newbie</title>
		<link>http://www.herrodius.com/blog/20</link>
		<comments>http://www.herrodius.com/blog/20#comments</comments>
		<pubDate>Tue, 14 Jun 2005 21:22:58 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://www.herrodius.com/blog/?p=20</guid>
		<description><![CDATA[With the departure of one of our ASP.NET co-workers, I decided to start learning ASP.NET and the whole Visual Studio .NET story. So I installed VS.NET, SQL Server and all that was needed and was about to create my first C# ASP.NET application when...
Visual Studio .NET has detected that the specified Web server is not [...]]]></description>
			<content:encoded><![CDATA[<p>With the departure of one of our ASP.NET co-workers, I decided to start learning ASP.NET and the whole Visual Studio .NET story. So I installed VS.NET, SQL Server and all that was needed and was about to create my first C# ASP.NET application when...</p>
<p><em><strong>Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web applications or services</strong></em></p>
<p>... I just installed all the software, updated the .NET framework and then this? I was about to uninstall the whole thing and head over to Eclipse for some FAME pleasure <img src='http://www.herrodius.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , but then decided to "google" for a solution and was more than happy to find one fast. So here it is.</p>
<blockquote><p>
 - Open Visual Studio Command prompt., via Start-> Programs -> VS.NET 2003 -> Tools -> Command Prompt<br />
 - Type â€œaspnet_regiis -iâ€œ and press enter.</p>
<p>The output should be:</p>
<p>c:\>aspnet_regiis -i<br />
Start installing ASP.NET (1.1.4322.0).<br />
Finished installing ASP.NET (1.1.4322.0).</p></blockquote>
<p>And now back to Visual Studio for some C#'n.<br />
Also, if anyone has some interesting links to ASP.NET resources, feel free to leave them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.herrodius.com/blog/20/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
