visual-studio-2019backwards-compatibilitywindows-server-2016windows-server-2019

Can an app build on windows server 2019 run on windows server 2016


I have an app that was built on windows server 2019, using Visual Studio 2019. It fails to run on windows server 2016.

Is there a way to get this app to run on windows server 2016?


Solution

  • The app in question was not bundling all of the MSVC redistributable files. CMake InstallRequiredSystemLibraries is used for bundling native libraries with the app, but the default behavior of that cmake function does not include the universal CRT libraries. I simply had to add set(CMAKE_INSTALL_UCRT_LIBRARIES true) before include(InstallRequiredSystemLibraries) in the cmake configuration file (CMakeLists.txt).

    An alternative solution is to manually install the latest MSVC redistributable package on the 2016 server.