Project Configurations

for RuBoard

A project configuration specifies build settings for a project. You can have several different configurations, and each configuration will be built in its own directory, so you can exercise the different configurations independently. Every project in a Visual Studio solution has two default configurations, Debug and Release . As the names suggest, the Debug configuration will build a debug version of the project, where you can do source level debugging by setting breakpoints, and so on. The bin\Debug directory will then contain a program database file with a .pdb extension that holds debugging and project state information.

You can choose the configuration from the main toolbar graphics/icon12.gif . You can also choose the configuration using the menu Build Configuration Manager..., which will bring up the Configuration Manager dialog. From the Active Solution Configuration dropdown, choose Release. See Figure A-8.

Figure A-8. Choosing Release in the Configuration Manager.

graphics/apafig08.gif

Build the project again. Now a second version of the IL language file Bytes.exe is created, this time in the bin\Release directory. There will be no .pdb file in this directory.

Creating a New Configuration

Sometimes it is useful to create additional configurations, which can save alternate build settings. As an example, let's create a configuration for a "checked" build. If you build with the /checked compiler switch, the compiler will generate IL code to check for integer underflow and overflow. In Visual Studio you set compiler options through dialog boxes. The following steps will guide you through creating a new configuration called CheckedDebug that will build a checked version of the program.

  1. Bring up the Configuration Manager dialog.

  2. From the Active Solution Configuration: dropdown, choose <New...> . The New Solution Configuration dialog will come up.

  3. Type CheckedDebug as the configuration name . Choose Copy Settings from Debug . Check "Also create new project configuration(s)." See Figure A-9. Click OK.

Figure A-9. Creating a new configuration.

graphics/apafig09.gif

Setting Build Settings for a Configuration

Next we will set the build settings for the new configuration. (You could also set build settings for one of the standard configurations, if you wanted to make any changes from the defaults provided.) Check the toolbar to verify that the new CheckedDebug is the currently active configuration.

  1. Right-click over Bytes in the Solution Explorer and choose Properties. The "Bytes Property Pages" dialog comes up.

  2. In Configuration Properties, select Build. Change the setting for "Check for overflow underflow" to True (see Figure A-10). Click OK.

    Figure A-10. Changing the build settings for a configuration.

    graphics/apafig10.gif

for RuBoard


Application Development Using C# and .NET
Application Development Using C# and .NET
ISBN: 013093383X
EAN: 2147483647
Year: 2001
Pages: 158

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