concept MSBuild script in category .net

appears as: MSBuild scripts, MSBuild script, n MSBuild script, MSBuild scripts
Continuous Integration in .NET

This is an excerpt from Manning's book Continuous Integration in .NET.

Figure 1.5. MSBuild Sidekick from Attrice makes it easy to develop and maintain MSBuild scripts.

Compile it using the MSBuild script build.proj, shown next. The .proj file should go in the same folder as the source file for the program.

Listing 3.2. Simple MSBuild script

This script should look familiar. Just as with NAnt, an MSBuild script is an XML document, and it uses a similar set of ideas including properties, targets, and tasks. The main element of an MSBuild script is a Project, which defines the entire build process. It must be equipped with an xmlns attribute that defines the namespace. Optionally, you can define default targets. In this case, you use the Build target.

After you define the new external tool, an MSBuild item appears on the Tools menu. Click it, and look at the Output window. The script build.proj is executed. As you can see, the convention of always naming build projects the same way is necessary here: otherwise, you have to define the external tool for every project file name. The output of the MSBuild script is visible in Visual Studio, as shown in figure 3.12.

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage