12

It was announced that the Universal CRT would be a re-distributable DLL such that app-local deployment would still be possible.

I have installed the Visual Studio 2015 Express Edition and I was looking for ucrtbase.dll in the SDK directories, but I could not find anything. The directory that I looked into was "C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10", but that only has the debug version of the CRT under "Microsoft.UniversalCRT.Debug".

I prefer not to copy any DLLs from my system, I always only package files from the "Redist" directories. So for instance (like with the previous versions of MSVC), I re-distribute files from "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT" with x86 builds of my app.

Is there a package that I can download that contains the ucrtbase.dll, or perhaps a Visual Studio or SDK update?

Also I am not sure at this point whether just the ucrtbase.dll will be sufficient, as the applications seem to be linked to the stub DLLs api-*.dll, and I'm not sure whether those need to be re-distributed as well.

Filip Konvička
  • 123
  • 1
  • 5
  • 1
    ucrtbase.dll is a system component in Win10. With Windows Update delivering it for older versions of Windows. You are not supposed to distribute it yourself. – Hans Passant Sep 16 '15 at 07:56
  • 2
    True except that Microsoft changed their minds and officially support redistribution of the DLLs. See the link in the accepted answer. – Filip Konvička Sep 17 '15 at 12:19
  • 1
    Hmm, not exactly, they are well aware that some of their customers don't use Windows Update. App-local deployment is not the same thing and harmful on a machine that actually has WU enabled. Such customers should bring their own. – Hans Passant Sep 17 '15 at 12:25
  • 1
    My question was specifically about app-local deployment and that is now one of the supported scenarios (even though not necessarily preferred or advertised). Originally Microsoft's plan was to not support this at all. – Filip Konvička Sep 18 '15 at 06:46
  • The api-* dependencies are bogus: https://ofekshilon.com/2016/03/27/on-api-ms-win-xxxxx-dll-and-other-dependency-walker-glitches/ – Ofek Shilon Apr 22 '16 at 09:25

2 Answers2

9

This blog post under Distributing Software that uses the Universal CRT section describes all the cases in detail, with a big red update notice concerning app-local deployment:

Updated September 11, 2015: App-local deployment of the Universal CRT is supported. To obtain the binaries for app-local deployment, install the Windows Software Development Kit (SDK) for Windows 10. The binaries will be installed to C:\Program Files (x86)\Windows Kits\10\Redist\ucrt. You will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows)

melak47
  • 4,622
  • 2
  • 24
  • 37
  • 2
    Thanks. I swear I have visited that blog post many times but apparently not recently enough. Also the installation of the SDK which I had failed previously now seems to work, and I can see the (41!) required DLLs. I wonder why they could not make it 42... – Filip Konvička Sep 17 '15 at 11:50
1

You can download UCRT from Microsoft Donwload Center. UCRT is part of OS now, for Vista SP2/7/8/8.1 it is distributed by Update Center.

23W
  • 1,162
  • 12
  • 32