Visual Studio/Live Writer tip: format as code

If you need to post a blog article containing code, and you happen to be using Visual Studio 2010 (VS), there’s a nice tool that provides an easy way to preserve it’s formatting and syntax coloration as it appears within VS.

[EDIT: The original LiveWriter plugin is no longer there — but Tim Mathias created a Visual Studio extension that accomplishes this (thank you Tim!). You can find it here ]

Download this extension using the button on the webpage. Launch the .msi file to install it. Now from within VS you just select your code, CTRL+C to copy it to the clipboard, and then go over to your Live Writer blog and in your main menu-bar, select Insert > Paste As VS Code… and ahhhh… check it!  You also get a nice panel of options to set, and you can save your custimizations as a default.

  1. namespace RLib
  2. {
  3.     /// <summary>
  4.     /// Providing this interface helps contribute a sort of ‘aspect-oriented programming’ structure
  5.     /// by interjecting an Interlocution and other subsystems across the board.
  6.     /// </summary>
  7.     public interface IApp
  8.     {
  9.         /// <summary>
  10.         /// Provide access to the Interlocution class that provides us with the various notification and logging services.
  11.         /// </summary>
  12.         IInterlocution Interlocution { get; }


Very nice Tim!

by james w. hurst


About James W Hurst

a professional software designer since the beginning days of the desktop cptr and uC-controlled avionics, I today am focusing on Java, Swift, C# and F# for building mobile and desktop and online applications under Android, Xamarin.Forms, iOS, WPF, and ASP.NET-MVC along with the requisite HTML/CSS/JavaScript/Ajax for web applications. My database expertise has covered a panoply of different database-engines and modeling approaches, and my main area of academic interest is Artificial Intelligence and vision.
This entry was posted in CodeProject, Visual Studio and tagged . Bookmark the permalink.

2 Responses to Visual Studio/Live Writer tip: format as code

  1. ElMatador says:

    Your Windows Live gallery – Paste As Visual Studio Code Link is dead.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s