Up to Visual Studio 2013 all you needed was msvcr[version].dll and msvcp[version].dll. Now they changed the DLLs with 2015. What do I need to include in order to avoid a redist installer?
EDIT:
It seems to be impossible now: http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
"App-local deployment of the Universal CRT is not supported."
UPDATE:
The content of the link above was updated on 11 Sep 2015. Now it's possible to make app-local deployment.
The Visual C++ Redistributable Packages install run-time components of Visual C++ libraries. These components are required to run C++ applications that are developed using Visual Studio 2015 and link dynamically to Visual C++ libraries.
The Redistributable is available in the my.visualstudio.com Downloads section as Visual C++ Redistributable for Visual Studio 2019 - Version 16.7. Use the Search box to find this version. To download the files, select the platform and language you need, and then choose the Download button.
On the menu bar, choose File > New > Project to open the New Project dialog box. In the left pane of the New Project dialog box, select Installed > Visual C++ > Windows Desktop. In the center pane, select Dynamic-Link Library (DLL).
Dll files are located in C:\Windows\System32.
This worked for me (x86 app).
Shipping all dlls from these locations with your app:
Myself, I needed an additional file to make this happen. Here are the directories, with one in a more generic format:
If you're using Qt, copy these files into the directory made by windeployqt.
In general, I found that you can just do step #1, and attempt to run your app. It will tell you the first of the files it is missing, and once you have put it in your app's directory, it will tell you the next one you need. In my case, it was two. Copying similar files from my <Windows>\System32 folder, e.g., was not successful. I have found using Dependency Walker and trying to satisfy the dependencies it indicates to be unsuccessful.
This allows you to make a portable app that will run on M$ OS's as old as XP; or install for users without vcredist_x86 or vcredist_x64, who don't have admin privileges.
BTW: Step #1 is pretty official. Here it is at the MSDN blog: Introducing the Universal CRT They say to copy them all for an app to run on all M$ OS's.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With