O'Reilly logo

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build by William Bartholomew, Sayed Ibrahim Hashimi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending ToolTask

There are many instances in which you need to invoke an .exe file in your build process. There is a task, the Exec task, which allows you to execute any command. This works great and is used throughout the MSBuild community. If you find yourself executing the same .exe on several occasions, then it may be worth writing a custom task to execute the command. Custom tasks that wrap up executables have many advantages to simply using the Exec task. Some of those benefits are outlined in the following list.

  • Ease of use. Since custom tasks have specific properties for inputs and outputs, they are very easy to use.

  • Better input validation. You can write .NET code to validate the parameters that the script is requesting be sent to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required