Chapter 45. Build Customization


  • Customizing the build environment

  • Performing actions at the beginning and the end of the build

  • Creating custom MSBuild scripts

Although you can build most of your projects using the default compilation options set up by Visual Studio 2010, occasionally you'll need to modify some aspect of the build process to achieve what you want. This chapter looks at the various build options available to you in both Visual Basic and C#, outlining what the different settings do so you can customize them to suit your own requirements.

In addition, you learn how Visual Studio 2010 uses the MSBuild engine to perform its compilations and how you can get under the hood of the configuration files that control the compilation of your projects.


Before you even get started on a project, you can modify some settings in the Options pages for Visual Studio 2010. These options apply to every project and solution that you open in the IDE, and as such can be used to customize your general experience when it comes to compiling your projects.

The first port of call for professional Visual Basic developers should be the General page of the Projects and Solutions group. By default, the Visual Basic development settings of the IDE hide some of the build options from view, so the only way to show them is to activate the Show Advanced Build Configurations option.

When this is active, the IDE displays the Build Configuration options in the My Project ...

Get Professional Visual Studio® 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.