Chapter 46

Build Customization

WHAT’S IN THIS CHAPTER?

  • 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 2012, occasionally you 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 that you can customize them to suit your requirements.

In addition, you learn how Visual Studio 2012 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.

GENERAL BUILD OPTIONS

Before you start on a project, you can modify some settings in the Options pages for Visual Studio 2012. 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 for 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 pages, and the ...

Get Professional Visual Studio 2012 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.