Preparing Release Builds

When a C#Builder application is first created, its default configuration is Debug. Most notably, this means that optimization is turned off, debug symbols are created, and #define directives associated with debugging are declared. This configuration is necessary for development but is not desirable for final deployment.

When preparing for deployment, the project configuration should be changed from the Debug configuration to something that matches the necessary deployment configuration. Normally, this is the Release configuration. However, that is not necessarily the absolute configuration for everyone. Fortunately, C#Builder offers choices for implementing a flexible deployment build configuration. To get a feel for this, open the Project Options dialog (see Figure 18.1) by pressing Ctrl+Shift+F11, selecting Options from the context menu of the project in the Project Manager, or selecting Project, Options from the main menu.

Figure 18.1. The Project Options dialog.

graphics/18fig01.jpg

For a custom configuration, make changes in each of the categories (Compiler, Application, and/or Debugger) of the Project Options dialog and click the Save As button, give the configuration a name, and click the OK button. Most people will just select the Release option, click the OK button, and recompile to create their deployment build. There are two primary points to make about the Release configuration: It is optimized and the output directory is bin\Release. Optimization makes the code smaller and faster, which is the desirable result for deployment. Also, remember that the output is now going to the bin\Release directory, under the base directory where the project is located. This is important to know for things like controls that may have been added to the Tool Palette by explicitly referencing the DLL file in the bin\Debug directory or file references that may have also been pointing at the bin\Debug directory. When testing the Release build, it will be important to make sure all references and projects are updated.



C# Builder KickStart
C# Builder KickStart
ISBN: 672325896
EAN: N/A
Year: 2003
Pages: 165

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net