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

<channel>
	<title>voodude.ch/blog</title>
	<atom:link href="http://www.voodude.ch/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.voodude.ch/blog</link>
	<description></description>
	<pubDate>Tue, 22 Jun 2010 08:20:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Html.EditorFor with Guid as model results in unexpected behaviour</title>
		<link>http://www.voodude.ch/blog/2010/06/22/htmleditorfor-with-guid-as-model-results-in-unexpected-behaviour/</link>
		<comments>http://www.voodude.ch/blog/2010/06/22/htmleditorfor-with-guid-as-model-results-in-unexpected-behaviour/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:07:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ASP.NET MVC]]></category>

		<category><![CDATA[ASP.NET MVC 2]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/?p=71</guid>
		<description><![CDATA[I&#8217;m working on an ASP.NET MVC 2 app in which the client wants to manage his products and stuff.
One requirement is that the user needs to have the possibility to make a copy of an existing product.
I have an edit view where a product can be modified. In that view i have an action link [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on an ASP.NET MVC 2 app in which the client wants to manage his products and stuff.<br />
One requirement is that the user needs to have the possibility to make a copy of an existing product.</p>
<p>I have an edit view where a product can be modified. In that view i have an action link to a copy action method to which the id of the current product is passed.</p>
<pre class="brush: csharp;">
public ActionResult Copy(Guid id)
{
var original = this.Repository.GetById(id);
var viewModel = this.GetNewViewModel();
if (original != null)
{
this.InvalidateCache();
viewModel = this.Mapper.Map(original);
}

viewModel.Id = Guid.NewGuid();
return this.View(&quot;Index&quot;, this.GetMasterDetailViewModel(viewModel));
}
</pre>
<p>I got some headache because I was using Html.EditorFor(m =&gt; m.Id) on the view, which in the case of a Guid creates a hidden field using the Html.Hidden(HtmlHelper, String, Object).</p>
<p>In the copy action I fetch the existing entity and map it to a new viewmodel(I don&#8217;t create an entity in the datastore yet so that the user can cancel the copy process). Then the same view that is used to display an existing product is used to display the copy of the product.</p>
<p>So basically I have two times the same viewmodel(except the id) passed to the same view and then posted back to the same URL. Here comes the problem with Html.EditorFor(m =&gt; m.Id).<br />
For some reason in the second postback, the value of the Guid is taken from the model state, aka what you get is a cached value.<br />
For my case this means that after the copy action is called I get the exact same HTML as if I wanted to display the original product. And then obviously if the user edits something and hits the save butten, the original is modified and not the copy.</p>
<p>A workaround for this is to write your own markup like this:</p>
<pre class="brush: xml;">
&lt;input id=&quot;Selected_Id&quot; type=&quot;hidden&quot; value=&quot;&lt;%=Model.Selected.Id%&gt;&quot; name=&quot;Selected.Id&quot; /&gt;
</pre>
<p>Like this the value is taken from the passed viewmodel, not from the model state and everything works fine.</p>
<p>This behaviour is by design and I think there must be a good reason for it(but I actually don&#8217;t speak enough ASP.NET MVC to truly understand why..). For further information here&#8217;s a discussion on Stack Overflow about the issue:</p>
<p><a title="http://stackoverflow.com/questions/594600/possible-bug-in-asp-net-mvc-with-form-values-being-replaced" href="http://stackoverflow.com/questions/594600/possible-bug-in-asp-net-mvc-with-form-values-being-replaced">http://stackoverflow.com/questions/594600/possible-bug-in-asp-net-mvc-with-form-values-being-replaced</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2010/06/22/htmleditorfor-with-guid-as-model-results-in-unexpected-behaviour/feed/</wfw:commentRss>
		</item>
		<item>
		<title>File checked out by build process and not checked in again in TFS 2010 Beta 1</title>
		<link>http://www.voodude.ch/blog/2009/05/28/file-checked-out-by-build-process-and-not-checked-in-again-in-tfs-2010-beta-1/</link>
		<comments>http://www.voodude.ch/blog/2009/05/28/file-checked-out-by-build-process-and-not-checked-in-again-in-tfs-2010-beta-1/#comments</comments>
		<pubDate>Thu, 28 May 2009 15:00:00 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[Continuous Integration]]></category>

		<category><![CDATA[TFS]]></category>

		<category><![CDATA[TFS2010]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/?p=14</guid>
		<description><![CDATA[While playing around with Team Build 2010 Beta 1, the build process running under the local service account checked out a file during a gated build and didn’t undo that.
I noticed it in the team explorer, one file kept having the checked-out icon, so I ran the following command in cmd:
tf.exe status $(ProjectDir) /user:* /recursive
Result:
ProductRepository.cs [...]]]></description>
			<content:encoded><![CDATA[<p>While playing around with Team Build 2010 Beta 1, the build process running under the local service account checked out a file during a gated build and didn’t undo that.</p>
<p>I noticed it in the team explorer, one file kept having the checked-out icon, so I ran the following command in cmd:</p>
<pre>tf.exe status $(ProjectDir) /user:* /recursive
Result:
ProductRepository.cs  edit   NT AUTHORITYNETWORK SERVICE C:\...ProductRepository.cs</pre>
<p>Aha! To fix this I checked the build log for the workspace name and then tried to used tf.exe again to undo this checkout with no luck:</p>
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl01other" class="libCScode" style="white-space: pre-wrap;">tf undo /workspace:"TFSURL_1_1;NT AUTHORITY\NETWORK SERVICE"
/server:http://tfsurl:8080 C:\...ProductRepository.cs
</pre>
<p>But this didn’t worked :(  tf undo didn&#8217;t found any checked out files.</p>
<p>Finally I could solve the problem with this hint from Robert Horvick on Twitter:</p>
<blockquote><p><span class="status-body"><strong><a class="screen-name" title="Robert Horvick" href="http://twitter.com/bubbafat">bubbafat</a></strong><span class="entry-content">@<a href="http://twitter.com/synclop">synclop</a> If you haven&#8217;t got a Network Service build checkout solution yet - one way would be deleting the workspace. #tfs</span></span></p></blockquote>
<p>So what I did was this:</p>
<pre id="ctl00_MTContentSelector1_mainContentContainer_ctl02other" class="libCScode" style="white-space: pre-wrap;">tf workspace /delete /server:http://tfsurl:8080 "TFSURL_1_1;NT AUTHORITY\NETWORK SERVICE"
</pre>
<p>And everything worked fine again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2009/05/28/file-checked-out-by-build-process-and-not-checked-in-again-in-tfs-2010-beta-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Troubles with Sharepoint while installing TFS 2010 Beta 1</title>
		<link>http://www.voodude.ch/blog/2009/05/26/sharepoint-troubles-while-installing-tfs-2010-beta-1/</link>
		<comments>http://www.voodude.ch/blog/2009/05/26/sharepoint-troubles-while-installing-tfs-2010-beta-1/#comments</comments>
		<pubDate>Tue, 26 May 2009 13:43:09 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[TFS]]></category>

		<category><![CDATA[TFS2010]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/2009/05/26/sharepoint-troubles-while-installing-tfs-2010-beta-1/</guid>
		<description><![CDATA[While installing Team Foundation Server 2010 Beta 1, I ran in some troubles with WSS 3.0. After the default configuration wizard finished, I got some warnings that the initial team project collection wasn&#8217;t created. The whole sharepoint installation, which should be done by the TFS configuration wizard, failed somehow and I ended up uninstalling and [...]]]></description>
			<content:encoded><![CDATA[<p>While installing Team Foundation Server 2010 Beta 1, I ran in some troubles with WSS 3.0. After the default configuration wizard finished, I got some warnings that the initial team project collection wasn&#8217;t created. The whole sharepoint installation, which should be done by the TFS configuration wizard, failed somehow and I ended up uninstalling and reinstalling TFS.</p>
<p>The problem was that i didn&#8217;t RTFM: <a href="http://download.microsoft.com/download/7/A/0/7A023209-096F-4F7D-B2BC-831ECC68FF5B/VS2010Beta1Readme.htm">http://download.microsoft.com/download/7/A/0/7A023209-096F-4F7D-B2BC-831ECC68FF5B/VS2010Beta1Readme.htm</a></p>
<blockquote><p><smaller><strong>1.3.4   Initial Configuration of Team Foundation Server Should be Run From MSI Program or by Command Line</strong><br />
Initial Team Foundation Server configuration fails on Windows SharePoint configuration if you access the Team Foundation Configuration Tool by clicking the link in the Team Foundation Administration Console instead of by launching Team Foundation Configuration Tool at the end of the installation phase.</p>
<p>To resolve this issue:</p>
<p>If you want to setup Windows SharePoint Server during Team Foundation Server configuration, you must launch the Team Foundation Server Configuration Tool by using one of the two following methods:</p>
<p>·         Launch the Team Foundation Configuration Tool by selecting the check box at the end of the Team Foundation Server installation</p>
<p>·         If you exited Team Foundation Server MSI program (setup.exe) without launching Team Foundation Configuration Tool, do not start the Administration Console from the Start menu item shortcut. Instead use following command line:</p>
<p>%programfiles%Microsoft team foundation server 10.0toolstfsmgmt.exe configure</p>
<p>After Team Foundation Server has installed and configured Windows SharePoint, you can configure Team Foundation Server by using the Start menu to launch Team Foundation Server Administration Console.</smaller></p></blockquote>
<p>Apparently I closed the configuration wizard after it fired up by the installer and restarted it over the TFS admin console.<br />
After deleting all DB&#8217;s and reinstalling, it worked for me. Perhaps even rerunning the configuration wizard would have solved the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2009/05/26/sharepoint-troubles-while-installing-tfs-2010-beta-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Migrating from CruiseControl.NET to TeamCity 3.1</title>
		<link>http://www.voodude.ch/blog/2008/06/02/migrating-from-cruisecontrolnet-to-teamcity-31/</link>
		<comments>http://www.voodude.ch/blog/2008/06/02/migrating-from-cruisecontrolnet-to-teamcity-31/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 13:54:32 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Continuous Integration]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/2008/06/02/migrating-from-cruisecontrolnet-to-teamcity-31/</guid>
		<description><![CDATA[At my company, we&#8217;ve been using CruiseControl.NET as continuous integration system of choice for about one year now. Recently we switched from CC.NET to TeamCity, here are some points i noticed while migrating.
CC.NET offers lot&#8217;s of things and is very extendable, for instance we wrote a custom labeller to tag our continuous builds. One thing [...]]]></description>
			<content:encoded><![CDATA[<p>At my company, we&#8217;ve been using <a href="http://ccnet.thoughtworks.com">CruiseControl.NET</a> as continuous integration system of choice for about one year now. Recently we switched from CC.NET to TeamCity, here are some points i noticed while migrating.</p>
<p>CC.NET offers lot&#8217;s of things and is very extendable, for instance we wrote a custom labeller to tag our continuous builds. One thing that was always pointed to by co-workers, is the fact, that everything is configured over XML files and for some people this was a mental barrier. The last CC.NET version was 1.3 which was released in June 07, since then there was no new release, imho this looked a bit like CC.NET stands on the holding track somehow.</p>
<p>As we migrated our Subversion repository to another server, we looked left and right for other CI solutions and then stumbled very soon upon <a href="http://www.jetbrains.com/teamcity/">TeamCity</a>. TeamCity is a build management and continuous integration solution from JetBrains, supporting both Java and .NET developement teams. The professional edition is free up to 20 build projects, which is quite a bunch and probably enough for much small companies. And it&#8217;s completely configurable over a webinterface <img src='http://www.voodude.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Our setup in CC.NET was the following: Per product we had one NAnt script and 2 CC.net projects. One of the CC.NET projects was used for continuous builds and was triggered with each commit to the SVN repository. The other project was triggered nightly and additionaly to the CI project all the AssemblyInfo.cs files in the project were updated with the current version number by the NAnt script, which resulted in dll&#8217;s being versioned. So these nightly builds we&#8217;re ready to be released as unstable versions to beta testing customers.</p>
<p>The versioning of the assemblies was quite dodgy in CC.NET and required some hacks. We used a similar approach for versioning as described in <a href="http://bloggingabout.net/blogs/joshua/archive/2005/07/26/8675.aspx">this post on bloggingabout.net</a>. Stamping the files was actually not  a problem, this can easily be done with a c# script task and some regexes within the NAnt file.</p>
<p>The more difficult point was, how do we get the version. We wanted a version number of the following format, major.minor.build.revision. The major and minor number were defined manually in the NAnt script.</p>
<p>Now for the buildnumber, we had a SVN repository containing a xml file with the purpose of containing always the next buildnumber to be used. In the NAnt script we defined a target called &#8220;extractbuildnumber&#8221; which made a svn checkout of that file into a temporary folder, xmlpeeked the buildnumber into an NAnt property, incremented the buildnumber by one and commited the XML file with the new buildnumber back to the repo.</p>
<p>To get the revision number we called svn log with the &#8211;xml parameter from our build script and xmlpeeked the revision number into a property.</p>
<p>This whole procedure got significant easier with TeamCity. For each build configuration in TeamCity you can define the build number format. Within this string you can reference the current build number(assigned by TeamCity itself) with {0} and the current revision number(read from SVN or whatever VCS you use by TeamCity) with {build.vcs.number.1}. </p>
<p><img src='http://www.voodude.ch/blog/wp-content/uploads/2008/06/tc1.png' alt='TeamCity Build Number' /></p>
<p>When running this build configuration, this string is evaluated and passed to the NAnt script (to Ant as well for sure) as a property named <em>build.number</em>. The whole process of extracting build and rev number like before with CC.NET gets obsolete with TeamCity. Another advantage of the configurable build number format is the labelling of the builds in TC. What had to be done in CC.NET with implementing ILabeller, can be done in one textbox in the webinterface using properties in TC.</p>
<p>Ah, one more thing to say! TeamCity has integrated diff. What we&#8217;ve done before with websvn and linking to it from CC.NET is all there in TeamCity. </p>
<p>All in all the migration was done within half a day and although we could do everything we wanted already with CC.NET, with TeamCity it&#8217;s just more fun <img src='http://www.voodude.ch/blog/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2008/06/02/migrating-from-cruisecontrolnet-to-teamcity-31/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Move clicked point to the center in Silverlight DeepZoom</title>
		<link>http://www.voodude.ch/blog/2008/04/18/move-clicked-point-to-the-center-in-silverlight-deepzoom/</link>
		<comments>http://www.voodude.ch/blog/2008/04/18/move-clicked-point-to-the-center-in-silverlight-deepzoom/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 18:51:49 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/2008/04/18/move-clicked-point-to-the-center-in-silverlight-deepzoom/</guid>
		<description><![CDATA[DeepZoom is neeeat  And neat indeed is also Scott Hanselman&#8217;s post about mouse wheel zoom handling for MultiScaleImages.  
In his sample, clicking on the MultiScaleImage zooms in by a certain amount and shift-clicking zooms out. I modified the MouseLeftButtonUp handler so that instead of zooming, the point where the click occured is moved [...]]]></description>
			<content:encoded><![CDATA[<p>DeepZoom is neeeat <img src='http://www.voodude.ch/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> And neat indeed is also Scott Hanselman&#8217;s <a href="http://www.hanselman.com/blog/TheWeeklySourceCode18DeepZoomSeadragonSilverlight2MultiScaleImageMouseWheelZoomingAndPanningEdition.aspx">post</a> about mouse wheel zoom handling for MultiScaleImages. <a href="http://www.hanselman.com/blog/TheWeeklySourceCode18DeepZoomSeadragonSilverlight2MultiScaleImageMouseWheelZoomingAndPanningEdition.aspx"> </a></p>
<p>In his sample, clicking on the MultiScaleImage zooms in by a certain amount and shift-clicking zooms out. I modified the MouseLeftButtonUp handler so that instead of zooming, the point where the click occured is moved to the center.</p>
<p>A sample which uses Scott&#8217;s implementation(and can be adapted to center instead of zooming) is found in the <a href="http://blogs.msdn.com/expression/archive/2008/03/09/deep-zoom-sample-with-mousewheel-pan-click-zoom.aspx">Expression Blend Team Blog</a>.</p>
<p>Heres the XAML:</p>
<pre class="brush: xml;">
&lt;UserControl x:Class=&quot;MoveClickPositionToCenter.Page&quot; xmlns=&quot;http://schemas.microsoft.com/client/2007&quot; xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;&gt;
&lt;Grid x:Name=&quot;LayoutRoot&quot; Background=&quot;Black&quot;&gt;
&lt;Grid HorizontalAlignment=&quot;Stretch&quot; Margin=&quot;0,0,0,50&quot; VerticalAlignment=&quot;Stretch&quot; x:Name=&quot;GridMain&quot;&gt;
&lt;MultiScaleImage Source=&quot;voodude/items.bin&quot; x:Name=&quot;msi&quot;/&gt;
&lt;/Grid&gt;
&lt;/Grid&gt;
&lt;/UserControl&gt;
</pre>
<p>And here the handler code:</p>
<pre class="brush: csharp;">
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();

this.MouseLeftButtonUp += delegate(object sender, MouseButtonEventArgs e)
{
Point newOrigin = new Point();

//width and height of the actual viewport
double viewportWidth = msi.ViewportWidth;
double viewportHeight = msi.ViewportWidth * msi.ActualHeight / msi.ActualWidth;

//the current origin
double currX = -msi.ViewportOrigin.X;
double currY = -msi.ViewportOrigin.Y;

//click position relative to the viewport
double clickX = viewportWidth * e.GetPosition(msi).X / msi.ActualWidth;
double clickY = viewportHeight * e.GetPosition(msi).Y / msi.ActualHeight;

//the center of the viewport
double centerX = viewportWidth / 2;
double centerY = viewportHeight / 2;

//calculate new origin
double newX = currX + centerX - clickX;
double newY = currY + centerY - clickY;

newOrigin.X = -newX;
newOrigin.Y = -newY;

msi.ViewportOrigin = newOrigin;
};
}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2008/04/18/move-clicked-point-to-the-center-in-silverlight-deepzoom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HttpWebRequest over SSL with Fiddler running</title>
		<link>http://www.voodude.ch/blog/2008/04/14/httpwebrequest-over-ssl-with-fiddler-running/</link>
		<comments>http://www.voodude.ch/blog/2008/04/14/httpwebrequest-over-ssl-with-fiddler-running/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 15:22:54 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Coding]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.voodude.ch/blog/2008/04/14/httpwebrequest-over-ssl-with-fiddler-running/</guid>
		<description><![CDATA[Fiddler is a very useful tool for capturing HTTP traffic. One can use it such as for figuring out what headers and POST-parameters are sent to a webserver when filling out a form. This information can then be used to programmatically create the same request to a webserver.
Fiddler is also able to decrypt SSL traffic. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fiddlertool.com/">Fiddler</a> is a very useful tool for capturing HTTP traffic. One can use it such as for figuring out what headers and POST-parameters are sent to a webserver when filling out a form. This information can then be used to programmatically create the same request to a webserver.</p>
<p>Fiddler is also able to decrypt SSL traffic. I used it recently to capture traffic over SSL sent by my browser and wanted then to use it again to check if my programmatic requests look the same as those from the browser. Because fiddler links itself as man-in-the-middle proxy between client and server, it also needs to provide a certificate for SSL requests. As this is not recognized as valid certificate, .NET throws an WebException at System.Net.HttpWebRequest.GetResponse() and no traffic shows up in fiddler.</p>
<p>To still be able to check accuracy of the programmatic requests with fiddler, it is possible to directly add a new delegate to ServicePointManager.ServerCertificateValidationCallback which always returns true:</p>
<pre class="brush: csharp;">
//* Hack for debugging purposes to accept Fiddler certificate
ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors)
{
return true;
};
//*/

// Create request, write post parameters and so on..
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(“https://www.someurl.com”)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2008/04/14/httpwebrequest-over-ssl-with-fiddler-running/feed/</wfw:commentRss>
		</item>
		<item>
		<title>VS like code highlighting in WordPress</title>
		<link>http://www.voodude.ch/blog/2008/04/14/vs-like-code-highlighting-in-wordpress/</link>
		<comments>http://www.voodude.ch/blog/2008/04/14/vs-like-code-highlighting-in-wordpress/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 11:25:31 +0000</pubDate>
		<dc:creator>voodude</dc:creator>
		
		<category><![CDATA[Wordpress]]></category>

		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://voodude.ch/blog/2008/04/14/vs-like-code-highlighting-in-wordpress/</guid>
		<description><![CDATA[In the wordpress plugins directory, different source highlighting plugins are found. I tried some of them but was not happy 100% as none of them colors C#, XAML etc. source code like it is colored in Visual Studio.
Finally i found this nice website, which converts sourcecode into HTML 4.01.
http://www.manoli.net/csharpformat/
Remains including the provided csharp.css in the [...]]]></description>
			<content:encoded><![CDATA[<p>In the wordpress plugins directory, different <a href="http://wordpress.org/extend/plugins/search.php?q=c%23">source highlighting plugins</a> are found. I tried some of them but was not happy 100% as none of them colors C#, XAML etc. source code like it is colored in Visual Studio.<br />
Finally i found this nice website, which converts sourcecode into HTML 4.01.</p>
<p><a href="http://www.manoli.net/csharpformat/">http://www.manoli.net/csharpformat/</a></p>
<p>Remains including the provided csharp.css in the header.php of your current WordPress theme and off you go:</p>
<p>C#</p>
<pre class="brush: csharp;">
public class OhHai
{
   private string _msg = &amp;amp;quot;oh hai!&amp;amp;quot;;

   public void SayHello()
   {
      Console.WriteLine(_msg);
   }
}
</pre>
<p>Yay! (Almost) like in VS <img src='http://www.voodude.ch/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Update 1.06.2009: Using <a href="http://wordpress.org/extend/plugins/syntaxhighlighter-plus/">SyntaxHighlighter Plus</a> instead now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.voodude.ch/blog/2008/04/14/vs-like-code-highlighting-in-wordpress/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

