Compiling in other IDEs - musescore/MuseScore GitHub Wiki

Summary

Prerequisites

Instructions assume you have already completed the required steps in:

  1. Set up developer environment
  2. Install Qt and Qt Creator
  3. Get MuseScore's source code
  4. Install dependencies

If you're a new developer, you should compile on the command line before you attempt to set up an IDE.

IDEs

Qt Creator (recommended)

Qt Creator is a cross-platform IDE that comes with Qt and is specifically designed for building Qt software. For instructions, see Compile in Qt Creator.

The internal team uses Qt Creator, so you'll find it's better supported than the other options. Nevertheless, if you prefer to use a different IDE, feel free to add instructions for it below. Many contributors successfully and easily compile, run, and debug MuseScore Studio in Visual Studio (support is available on Discord).


CLion

Summary:

  1. Create a CMake profile
    1. Default CMAKE_INSTALL_PREFIX
  2. Create a run (debug) configuration
    1. Set install target
  3. Start debugging

Create a CMake profile

Your CMake profile for MuseScore is where you can make configuration changes. Create one for MuseScore, and deselect the "share" box so it doesn't bother you in other projects. Set the build type to Debug.

Default CMAKE_INSTALL_PREFIX

It is recommended under the Qt Creator guide to have a dummy install directory under your build. To do this in CLion, add -DCMAKE_INSTALL_PREFIX=$CMakeCurrentBuildDir$/install to the CMake Options field.

Create a run (debug) configuration

Under the run configurations menu (left of the green run arrow), click edit configurations. Create a new CMake application and choose a name for it (e.g. TestRun). Change the target to "All targets" (the topmost option in the dropdown).

Set install target

Set the executable field to $CMakeCurrentBuildDir$/install/bin/mscore. Under "Before launch," remove the default build step and add the install step.

Start debugging

With the new run configuration, debugging should work as normal with CLion.


Visual Studio

This guide shows how to build MuseScore on Windows using Visual Studio 2022/2026:

WARNING: There are known issues where one or more projects may fail to build on Windows due to some paths exceeding 255 characters even if you have long paths enabled. Usually these failures are in the tests projects and the MuseScoreStudio project builds fine which means you can ignore the failures. To avoid this, it is recommended to choose a folder for MuseScoreStudio as short as possible, e.g. C:\MuseScore rather than C:\<your_name>\development\MuseScoreStudio.

  1. Prerequisites

    • Install Visual Studio 2022/2026 with the Desktop development with C++ workload.
    • Install CMake version ≥ 3.21 for VS 2022 and ≥ 4.2 for VS 2026.
    • Install Git.
    • Add Qt's bin folder (e.g. C:\Tools\Qt\6.11.0\msvc2022_64\bin depending on where and which version of Qt you have) to your PATH environment variable.
  2. Clone the repo

  3. Optional: Disable CMake Presets in VS If you have Always use CMake Presets enabled, Visual Studio will ignore your CMakeSettings.json and generate a CMakePresets.json instead—so you won’t see the expected msvc.build_x64 folder. To restore the default behavior:

    1. In Visual Studio go to Tools → Options → CMake → General.
    2. Under CMake configuration file, select Never use CMake Presets.
    3. Reload your “Standard Build” configuration; you’ll again get the msvc.build_x64 folder.
  4. Configure

    mkdir build
    cd build
    cmake .. -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo
    1. You can use any name you want for the build folder but don't make it long due to the possible long paths issue mentioned above.
    2. For VS 2026 use "Visual Studio 18 2026".
    3. Replace RelWithDebInfo with another configuration (e.g. Debug) if you prefer. Keep in mind that Debug runs really slowly.
  5. Open & Build

    1. Double-click MuseScore.sln (MuseScore.slnx for VS 2026) in the build folder to open the solution in Visual Studio.
    2. Select the RelWithDebInfo configuration from the toolbar (or Debug if you went with Debug above).
    3. Choose Build → Build Solution (or press Ctrl+Shift+B).
  6. Run & Debug

    • Press F5 to launch MuseScore under the debugger.
    • Set breakpoints in C++ or QML and step through as needed.

Older instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).


Visual Studio Code

TODO: How to compile and debug MuseScore Studio in Visual Studio Code (aka VS Code).

  1. Within VS Code, go to File > Open Folder and select the MuseScore source folder on your machine.
  2. Install extensions for VS Code:
    • ...

Xcode

Instructions are here in the old Developer's Handbook. Feel free to transfer them to this page (omit anything covered in Prerequisites).


⚠️ **GitHub.com Fallback** ⚠️