I'm writing a progam with C++/CLI. It compiles and runs perfectly on my PC but when I try to run it on another PC it pops up a message:
"the application has failed to start because its side-by-side configuration is incorrect"
Now, I'm not asking what this means. I googled it and I found that probably needs some Redistributable. Maybe not. My question is, how do I know which Redistributables (year and version) the end-users will need? If it needs?
Yes you are missing the redistributable. The version you need is based on the version of Visual Studio you are compiling your program with. The redistributable is included with the compiler you are using. They use the same file names for all versions of the compiler. Search for one of these files on your c drive.
vcredist_x86.exe for 32-bit applications.
vcredist_x64.exe for 64-bit applications.
I am running Visual Studio 2012. They are found in the following folder. C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\redist\1033
As binarybob350, the one your end users will require is the one installed with your compiler (or rather, on the build machine, in case that's out of step).
When I'm diagnosing this kind of problem, I use depends.exe to confirm that the version of the runtime, etc my binaries end up using is what I expect.
My home PC is an old Windows XP box running Visual Studio 2008. So when I check my binaries in depends.exe I get things like:
It turned out that the problem was me compiling the project with debug configuration. I compiled it with release configuration and it worked perfectly.
But I think it will be very usefull to know these things about redistributables in the future.
Only redistributable your end-users needs for C++/CLI is .NET Framework runtime, which could be most likely already installed, as many programs requires it these days.
vcredist.exe is only required for native C or C++ programs, which is not the case here.