none
What redistributable for Visual C++ 2019? RRS feed

  • Question

  • We are shipping binaries built with Visual C++ 2019 (latest 16.2.2 version).

    These binaries are built with /MD (to use the CRT dlls).

    They are built with the "Windows SDK version" set to "10.0 (latest installed version)" and the "Platform toolset" set to "Visual Studio 2019 (v142)"

    For the linker options we set the "minimum required version" to the default.

    In our code we set _WIN32_WINNT to 0x0601. (for Windows 7). We are not using MFC or ATL.

    I know that Windows ships certain CRT dlls (ucrtbase.dll for example) but can anyone tell me (based on the settings and things above whether the versions of Windows we target do or don't include the CRT dlls, which dlls are or aren't included with those versions of Windows and which, if any, CRT redistributable we should be shipping and installing to ensure our users have all the right dlls?

    Sunday, August 18, 2019 2:29 AM

All replies

  • From The latest supported Visual C++ downloads,

    "Visual C++ 2015, 2017 and 2019 all share the same redistributable files."

    Sunday, August 18, 2019 7:51 AM
  • The UCRT is not distributed with Windows versions earlier than Win 10.  So I suggest you read Universal CRT deployment for information about how the UCRT can be deployed to a target system.  The VC++ redistributables include a base version of the UCRT, but since it is a system component updates are made through Windows Update.

    Sunday, August 18, 2019 9:01 AM
  • The UCRT is deployed through Windows update for versions of Windows prior to Windows 10. If you go to the Microsoft Update catalogue and look at the details for KB3118401, you will notice that it lists all of the monthly Windows Update packages as superseding it:

    So as long as you are running a version of Windows that was updated after April 2017 then it has the UCRT. Windows Vista went out of support in April 2017, so it never had an update which included the UCRT. Windows 8.1 was seen as a service pack of sorts to Windows 8 so it went out of support in 2016.

    However, the Visual C++ redistributable isn't just made up of the UCRT, and in some cases doesn't even contain the UCRT.

    The Visual C++ redistributable contains - where xxx is the version:

    vcruntimexxx.dll

    msvcpxxx.dll

    concrtxxx.dll

    vccorlibxxx.dll

    vcampxxx.dll

    vcompxxx.dll

    mfcxxx.dll

    mfcxxxu.dll

    mfcmxxx.dll

    mfcmxxxu.dll

    and the localisations for MFC.

    So while ucrtbase.dll is distributed via Windows Update, that doesn't include any of the Visual C++ specific libraries. Since you are guaranteed to be using vcruntimexxx.dll (this contains exception handling and some other utility functions) and most likely the C++ standard library, then you are going to be relying on libraries that aren't distributed as part of Windows.

    Because of this, you always need to distribute the Visual C++ 2015 - 2019 redistributable to run a Visual C++ project on a computer.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Sunday, August 18, 2019 10:04 AM
  • Thanks for clarifying the availability of the UCRT on versions prior to Win 10.

    Small nitpick, Win 8.1 left mainstream support in 2018 and is in extended support until 2023. https://support.microsoft.com/en-us/lifecycle/search?alpha=Windows%208.1

    Sunday, August 18, 2019 10:36 AM
  • Sorry, that was a badly formed sentence. Windows 8.1 stayed implied as the subject.

    To clarify what I meant, Windows 8.1 was seen as a service pack of sorts for Windows 8, so Windows 8 went out of support in 2016.


    This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.

    Sunday, August 18, 2019 12:08 PM
  • Does anyone know how to do a silent install for the latest Visual C++ download (listed under "Visual Studio 2015, 2017 and 2019") and what codes it returns for success vs failure? (we want to have our own installer run the VS runtime installer without any UI and then stop installing if the VS runtime installer fails to install)

    Sunday, August 18, 2019 10:29 PM
  • Hi,

    Thank you for posting here.

    >>Does anyone know how to do a silent install for the latest Visual C++ download (listed under "Visual Studio 2015, 2017 and 2019") 

    I suggest you could try to use "<full path>\vc_redist.x86 /q /norestart" as your command line to do a silent install.

    For more details I suggest you could refer to the link: https://blogs.msdn.microsoft.com/astebner/2010/10/20/mailbag-how-to-perform-a-silent-install-of-the-visual-c-2010-redistributable-packages/

    Best Regards,

    Jeanine Zhang

    Friday, August 23, 2019 7:16 AM
    Moderator