Syntax Highlighting for .build and .msbuild

by Donn Felker 1. December 2007 00:02

Sara Ford posted a blog entry (which I got from the VS2008 Tip of the Day Gadget on Vista) which made me slap my forehead and say "... #$@#! why didn't I find that before."

Pretty much, you can show syntax highlighting for custom file extensions.

 

When I make build files, I like to name them .build or .msbuild (depends on whether its a NAnt script or MSBuild script).

 

Previously, I would edit my build script in Notepad++ and set the style to XML for syntax highlighting. It worked well, but I hated having to leave Visual Studio to edit my build file with nice pretty colors.

Now, with this tip (see the link above) I have set my build file extensions to open with the XML Editor.

Here's what I did:

buildFileSyntaxColoring

 

Now when I open the build files I get the pretty colors.

Oh how the simple things impress me at times. I just wish I knew about this before. It just goes to show you that Visual Studio is a very in depth program.

Thanks for the tip Sara!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Donn Felker

Senior Consultant
MCTS
ScrumMaster
Agile Practitioner

About Me | Books I Recommend

Gotta Pay The Bills


Tag cloud

    Popular Posts

    RecentComments

    Comment RSS

    Calendar

    <<  January 2009  >>
    MoTuWeThFrSaSu
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    View posts in large calendar