Is there any difference when compiling MuseScore in Visual Studio 2019?

• Jun 15, 2019 - 16:24

Visual Studio 2019 was released not long time ago so I downloaded it. I want to try compiling MuseScore using VS2019 and I wonder if there's anything different than in VS2017? Including the installation settings of VS2019 itself and the pre-requisites?


Also, I downloaded Jack 64-bit setup wizard but why does it install in C:\Program Files (x86)\Jack? The version installed is 1.9.11.

"The file dependencies.7z contains all the required dependencies, and is easier to use. Download, and extract the contents into the base dir. (This will create a new dependencies folder in that base dir.)"
-- Additional Dependencies in the guide

What is the "base dir"? The base directory of the MuseScore project?

"Add C:\Qt\5.12.3\msvc2017_64\binto your PATH variable (C:\Qt\5.12.3\msvc2017\bin for 32-bit)
CMake "can't find resource" failures are probably because the Qt path is not set properly in PATH.
Make sure you removed mingw's C:\Qt\5.*\mingw*\bin entrance from the PATH if any"

What is PATH?

What's wrong with it...

C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX:PATH="C:\E盘\MuseScore-master\msvc.install_x64" -DCMAKE_BUILD_TYPE:STRING="RELWITHDEBINFO" -DBUILD_FOR_WINSTORE:STRING="OFF" -DBUILD_64:STRING="ON" -DCMAKE_PREFIX_PATH:STRING="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/bin/Roslyn;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Team Tools/Performance Tools/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Team Tools/Performance Tools;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019//x64;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/;C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x64;C:/Program Files (x86)/Windows Kits/10/bin/x64;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community//MSBuild/Current/Bin;C:/Windows/Microsoft.NET/Framework64/v4.0.30319;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/Tools/;C:/Program Files (x86)/Intel/iCLS Client/;C:/Program Files/Intel/iCLS Client/;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;C:/WINDOWS/System32/WindowsPowerShell/v1.0/;C:/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL;C:/Program Files/Intel/Intel(R) Management Engine Components/DAL;C:/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT;C:/Program Files/Intel/Intel(R) Management Engine Components/IPT;C:/WINDOWS/System32/OpenSSH/;C:/CTEX/UserData/miktex/bin;C:/CTEX/MiKTeX/miktex/bin;C:/CTEX/CTeX/ctex/bin;C:/CTEX/CTeX/cct/bin;C:/CTEX/CTeX/ty/bin;C:/CTEX/Ghostscript/gs9.05/bin;C:/CTEX/GSview/gsview;C:/CTEX/WinEdt;C:/Program Files/Git/cmd;C:/Users/svetz/AppData/Local/Microsoft/WindowsApps;;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin;C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja;C:/E盘/MuseScore-master/dependencies" -DCMAKE_LIBRARY_PATH:STRING="C:/E盘/MuseScore-master/dependencies/libx64" -Wno-deprecated -DCMAKE_CONFIGURATION_TYPES="RelWithDebInfo" "C:\E盘\MuseScore-master" returned with exit code: 1

In reply to by Jojo-Schmitz

I laughed for literally a minute after seeing your reply XDD
But no, after I moved the MuseScore folder to C:\MuseScore-master the problem still occurred. I'm afraid the problem is as below:

1> [CMake] CMake Error at C:\MuseScore-master\CMakeLists.txt:20 (project):
1> [CMake] Generator
1> [CMake]
1> [CMake] Visual Studio 15 2017
1> [CMake]
1> [CMake] could not find any instance of Visual Studio.

Seems like the current version cannot accept Visual Studio 2019?

In reply to by Howard-C



That of course needs to be:


OK, so CMake and build were all successful (at least Visual Studio told me so), but when I hit Local Windows Debugger the program said three dlls missing: portaudio.dll, libsndfile-1.dll and libvorbisfile.dll. So where's wrong?

In reply to by Jojo-Schmitz

Thanks, now it's a complete success. I indeed missed the INSTALL step because I was looking at Compile the project at the bottom of the instructions, and there it doesn't mention the INSTALL step. Actually

Execute (or at least, try to execute) MuseScore by clicking on “Local Windows Debugger” on the main toolbar of Visual Studio (or, alternatively, right-click on the mscore project, and select “Debug” -> “Start new instance”).

mentioned in it doesn't work either, MuseScore will only start when opened from msvc.install_x64 > bin. I don't know if this is only not working in VS2019, or that it doesn't work in VS2017 and the instruction is outdated? (Or there are simply mistakes in my operation?)

EDIT: OK, I think maybe it's my fault, let the screenshot explain this -- the last sentence is "access denied".
批注 2019-06-18 001409.png

In reply to by Howard-C

Would you mind sharing with me your two files? I've tried to modify them accordingly but now I get this error:

System.TypeLoadException:-1: error: Could not load type 'System.Runtime.InteropServices.OSPlatform' from assembly 'mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

The files I modified:
Would you mind posting here your
- CMakeSettings.json
- msvc_build.bat
- mybuild.bat (if you use it as here)

Attachment Size
modifs.PNG 39.69 KB

In reply to by Marr11317

I believe VS exposes itself to CMake only with the architecture included if you have different architecture targets installed of the VS toolchain.
So if you only installed the x86 or x64 toolchain, then you indeed shouldn't have a suffix for it.

(other than that, I haven't tried building with MSVC recently and still have 2017 here; so unfortunately can't offer any further insight into what would be failing on your end)

Do you still have an unanswered question? Please log in first to post your question.