blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Stuart Preston's Blog

Mostly about Visual Studio Team System, Team Foundation Server, Engineering Practices and Application Lifecycle Management.

MSBuild Project Template v2.0

Last year I created an MSBuild Project Template that lets you work with Source Control (e.g. Team Foundation Server) and decent syntax highlighting by default when using MSBuild proj files.  It was fairly well received and I finally got time today to implement a couple of the suggestions that have come up in the intervening 8 months.

I've uploaded the resulting template to http://www.codeplex.com/MSBuildTemplate

The major changes are as follows:

  • The source code to a HelloWorld custom task is now included instead of the pre-built task.
  • I've changed the debugging parameters so that you can step through custom tasks by putting breakpoints in.
  • The template dynamically generates the reference to the task binary based on the ProjectName specified.

Usage is just as before, first of all download the project template from here http://www.codeplex.com/MSBuildTemplate, then drop the entire zip file into your Documents\Visual Studio 200x\Templates\ProjectTemplates folder (don't expand it!!!).  Restart Visual Studio and create a new project.  You should see the "MSBuild Project" template appear under My Templates.

image

Once you have created a new Project (and Solution if necessary), your solution will be structured like this:

 image 

Pressing F5 will compile the Custom Task and start the MSBuild.exe (v2.0) with the Build.proj as its parameter.  The custom task can be debugged directly from the IDE.  Set a breakpoint within the task and start debugging to see what I mean.

image

As before, please leave comments for improvements on this site or on the Codeplex site.

Published 21 March 2008 18:40 by Stuart.Preston

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

 

Team System News said:

Todd Mancini on Process Guidance Center on MSDN. Stuart Preston on MSBuild Project Template v2.0. Dave...

March 25, 2008 14:23

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Personal Edition), by Telligent Systems