8. June 2010 02:04
I have been searching a long time for the best way to add C# code fragments to my blog posts. I have tried Manoli for quite some while, which I learned from Henry Cordes. But if you use that, the RSS feeds really s#ck.
So I switched to screen shots in my latest posts to have an easy way to present the code fragments. Now the RSS feeds look good too. The downside of this is that you cannot copy and paste the code anymore.
I have now found a method to add code to my posts in a formatted way, which also are nicely formatted in the RSS feeds. Microsoft has released the Visual Studio Pro Power Tools with which you can copy code fragments. Visual Studio will place the code on the clipboard in an HTML format. When you use Live Writer, just like me, you can execute the paste special command which enables you to paste the code in a formatted way.
I finally have a solution to a problem that I found very annoying since I started blogging.