Building and cleaning projects and solutions 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.

Follow the steps in this article to learn how to build, rebuild, or clean your all or some of the projects in a solution.

Note

This topic applies to Visual Studio for Mac. For Visual Studio on Windows, see Build and clean projects and solutions in Visual Studio.

To build, rebuild, or clean an entire solution

  1. Select the Solution node in the Solution Window:

    Selecting the solution node

  2. Select the Build menu in the Menu Bar and choose one of the following options:

    selecting the build all menu item

    • Choose Build All to compile the files and components within the project that have changed since the most recent build.

    • Choose Rebuild All to "clean" the solution and then builds all project files and components.

    • Choose Clean All to delete any intermediate and output files. With only the project and component files left, new instances of the intermediate and output files can then be built.

To build or rebuild a single project

  1. Select the project in the Solution Window.

  2. Select the Build menu from the Menu Bar.

  3. Choose either Build[ProjectName], Rebuild[ProjectName], or Clean[ProjectName].

To stop a build

To stop a build, use one of the following options:

  • Press the red square in the status area:

    Press red square to stop build

  • Use the Stop item in the Build menu.

  • Press Cmd+Shift+Return.

See also