Running Visual Studio 2015 C ++ executable file without installing Visual C ++ redistributable packages

Short version: Is it possible to run an executable compiled using Visual Studio 2015 without installing the redistributable Visual C ++ packages and instead copy the DLLs at runtime to the same folder as your executable?

Long version ...

Since the mid-1990s, I have written small programs using Visual C ++, and then Visual Studio. Prior to Visual Studio 2013, I could always run these programs on any Windows host, as long as I put msvcpXXX.dll and msvcrXXX.dll in the same directory. I have never had to install redistributable Visual C ++ packages.

Now with Visual Studio 2015 this no longer works. Firstly, there is no msvcrXXX.dll. So I copied msvcp140.dll and three other dlls that I found in the Visual Studio folder. C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ VC \ redist \ x64 \ Microsoft.VC140.CRT (concrt140.dll, vccorlib140.dll, vcruntime140.dll). Still not working.

Looking at the depend.exe file, I think that there are many dependencies that are not allowed in these DLLs. I admit, I'm a little overloaded and did not dig myself to find out every DLL I need to satisfy the dependencies. But he began to feel very hacks, since many of them were installed under C: \ Windows and were not present in my Visual Studio redistributable folders.

Anyway, can anyone help?

+6
source share
1 answer

It was unexpectedly not closed as a duplicate. And I hate to leave open questions unanswered. Therefore, I myself will answer it by saying that the comment on the codename is related to this question , which refers to this article , which describes how to do this in the section that begins with bold red text.

You should not promote it. Confirm the answer in a related question.

+3
source

All Articles