Not a subscriber?

Join thousands of others who are building self-directed lives through creativity, grit, and digital strategy—breaking free from the 9–5.
Receive one free message a week

Syntax Highlighting for .build and .msbuild

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!