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 the Clean

Whenever you extend the build process to generate files you must make sure that those files get cleaned up when the clean process is executed. Two primary ways of performing this are:

  • Appending to the FileWrites item list

  • Injecting custom targets into the clean process

The Microsoft.Common.targets file maintains a list of files that needs to be removed when the Clean target is executed; this list is the FileWrites list. It is written to disk in the base intermediate output path (i.e., obj\Debug) as the ProjectFileName.FileListAbsolute.txt file, where ProjectFileName is the name of the project file, including the extension. You can add values to the FileWrites item list if you need files deleted that were generated by custom steps ...

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