MATLAB: Does the compiled standalone or MEX file fail to run on a deployment machine while it works on the development machine

m-codeMATLAB Compilermsvcr100d.dllmsvcr90d.dllstand-alone

I am compiling a MEX-file or deploying some MATLAB code with one of the MATLAB Compiler products. The file works fine on the development machine, but when I try to deploy it I receive an error.
Sometimes I receive the following error:
Error: The Side-by-Side configuration information in "C:\XYZ\ABCXYZ.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).

Best Answer

This can be caused by the fact that you compiled your application or MEX file using the "Debug" configuration, and this version requires the debug version of the Microsoft Runtime Libraries. If you did not use the debug configuration, you might nonetheless have copied the debug version of the executable to your deployment machine.
To investigate this issue, follow the instructions under Related Solutions to check the dependencies of your executable. If you see an entry such as "MSVCR80d.DLL" (with a "d" after the version number, in this case 80), or similar, then you are using the debug version of your executable, which is usually not present on deployment machines (only on machines with Visual Studio or the Framework SDK)
To work around this issue, make sure you select "Release" under Project -> Properties and make sure that you copy the release version of your executable to the deployment machine.