O'Reilly logo

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

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

Chapter 9. Practical Applications, Part 2

In the previous chapter, we started presenting some possible applications of MSBuild that you can use in your own build process. In this chapter, we’ll examine some examples geared towards Web applications. Some of the examples in this chapter include starting and stopping services, encrypting the web.config file, and compressing JavaScript files.

Starting and Stopping Services

There are several instances where either your build or deployment process relies on services to be running. In these cases, you should ensure that the services are installed and started before they are needed. It’s very easy to start and stop services from MSBuild.

You can use the Exec command to execute the command net start or

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