Condividi tramite


Creating and editing build configurations in Visual Studio for Mac

Important

Visual Studio for Mac was retired on August 31, 2024 in accordance with Microsoft’s Modern Lifecycle Policy. While you can continue to work with Visual Studio for Mac, there are several other options for developers on Mac such as the preview version of the new C# Dev Kit extension for VS Code.

Learn more about support timelines and alternatives.

Build configurations give you precise control over a build allowing you to create configurations to cater to different testing and distribution situations. You can create build configurations for individual projects or on a solution-wide basis.

You can create new configurations and edit existing ones for both projects and solutions using the Project Options dialog.

Note

This topic applies to Visual Studio for Mac. For Visual Studio on Windows, see How to: Create and edit configurations.

Creating a project build configuration

To create a project build configuration, follow these steps:

  1. Right-click on the project node and select Options. You can also double-click on the project node to bring up the Project Options dialog.

  2. In the Project Options dialog, select Build > Configurations:

    Configurations manager in project options

  3. Select Add to create a new configuration. You can also copy any of the existing configurations.

Once you've created the configuration, you can use the Build section in the Project Options to adapt properties appropriate to your configuration:

Configure build options

Creating a solution build configuration

To create a solution build configuration, follow these steps:

  1. Right-click on the solution node and select Options. You can also double-click on the solution node to bring up the Solution Options dialog.

  2. In the Solution Options dialog, select Build > Configurations:

    Configurations manager in solution options

  3. Select Add to create a new configuration. You can also copy any of the existing configurations.

Once you've created the configuration, you can use the Build section of the Project Options dialog for each of your projects to adapt properties appropriate to your configuration:

Configure build options

Renaming a build configuration

To rename a configuration, select it from the Configuration list by navigating to Build > Configurations in the Project or Solution Options:

configuration list

Select the Rename button.

rename dialog

Then select OK to confirm.

See also