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

Importing Files

MSBuild natively supports importing project files or targets. In fact, this is how Visual Studio builds your projects. In this section, we will see how this works and how you can take advantage of it in your build process. To reuse the contents of other files you must use the Import element. This element must be placed directly inside the Project element, at the same level as a Target. You specify the file that is to be imported by using the Project attribute. The only other attribute that can be placed on the Import element is the Condition attribute, as with most other MSBuild elements. These are the only two attributes that can be specified for the Import element. If you take a look at any C# project created by Visual Studio ...

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