Adding a Configuration Item

Configuration project items are added at the project level in the solution. To add a configuration, follow these steps:

  1. In Solution Explorer, right-click the Project and select Add | New Item. The Add New Item dialog appears.

  2. Select the Configuration item from the General templates.

  3. Enter the name for the configuration and click OK. The Configuration item appears in Solution Explorer and opens in the Designer.

  4. In the sample image shown below, Configurations named HelpDeskRegionNE and HelpDeskRegionNE were added to the project. Continue by Defining the Configuration.

 

Define the Configuration

After adding a configuration project item, define the configuration item by selecting components (or controls) and property-value pairs. Each combination of component-property-value is a profile. A configuration item may contain multiple profiles. These steps show how to define configurations for the Form Text for a Windows form.

  1. Open the Windows form in the Designer and select the Text property for the form. Right-click the property and select Configure. The Property Configuration dialog appears:

  2. Set the value for the property in the New 'Text' property value box. In this example the HelpDeskRegionMW configuration uses the Windows Form Text value of Midwest Region.

  3. Click Apply to set the property value for the selected configuration.

  4. In the Configuration box, select the next configuration (HelpDeskRegionNE) and then set the Form text value for this configuration. An example is shown below:

  5. Click Apply to set the property value for the selected Configuration and then click OK. The configurations are updated in the Designer with the component-property-value profiles. See the example below:




These steps show how to set a single component-property-value profile for a configuration. You can add more than one profiles to a configuration.

Once you finish defining the configurations, you can run the project with a specific configuration or deploy the project with one or more configurations. See the Project Properties topic for information setting the configuration for the project.

See also

Configuration Item Functions

Project Deployment Overview