Welcome to MSDN Blogs Sign in | Join | Help

Syntax Highlighted Code in Your Blog

I sometimes get questions about how to paste syntax highlighted code from Visual Studio into your blog so that it looks purdy, even when using code from a beta product:

var pred = Expression.Lambda<Func<Customer, bool>>(
                  Expression.Equal(Expression.Property(c1, City),
                  Expression.Constant("Seattle")), c1);

You should first install Live Writer:

http://get.live.com/WL/config_all

Then go to the Live Gallery:

http://gallery.live.com/?mkt=en-us

Look at all the Live Writer Add ins:

http://gallery.live.com/results.aspx?bt=9&pl=8&st=3

Select the Paste from Visual Studio add in:

http://gallery.live.com/liveItemDetail.aspx?li=d8835a5e-28da-4242-82eb-e1a006b083b9&bt=9&pl=8

Published Tuesday, November 13, 2007 1:55 PM by Charlie Calvert
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# MSDN Blog Postings &raquo; Syntax Highlighted Code in Your Blog

Tuesday, November 13, 2007 7:37 PM by MSDN Blog Postings » Syntax Highlighted Code in Your Blog

# re: Syntax Highlighted Code in Your Blog

Wednesday, November 14, 2007 3:04 AM by Ben

# re: Syntax Highlighted Code in Your Blog

Ben,

Yes, the Manoli tools are great. I've used them a lot. Recently I've used Paste from VS because that will capture the cases where the team has added some new feature, usually in a beta, that is not available yet in the manoli tools. There is a manoli add in for LiveWriter.

- Charlie

Wednesday, November 14, 2007 5:35 PM by Charlie Calvert

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker