Aug 25, 2008

Side-by-side configuration is incorrect

If you develop a native Windows application with Microsoft Visual Studio 2008 and try to run it on another machine, you might get an error message complaining about side-by-side configuration is incorrect. The application eventlog (control panel>administrative tools) will reveal that this is related to missing VC90 CRT. So this error message means that your application needs Visual C++ runtime library to function.

Retail version of Visual C++ runtime can be downloaded from Microsoft. Here is the x86 version. On the other hand, the debug version of Visual C++ runtime is not allowed to be distributed due to license issues. So, if you would like to make your application run on a machine without development environment, there are two options.

1) Build your program to statically link the runtime. To do that, in the project property page under "Configuration Properties > C/C++ > Code Generation", change run-time library from "Multi-threaded DLL (/MD)" to "Multi-threaded (/MT)".

2) Build your program to dynamically link the runtime AND install visual c++ redistributable (download link) on the target machine.

Happy coding...

1 comment:

Unknown said...

"Build your program to dynamically link the runtime" means I should set some Visual Studio compiler switch(es)? What exactly was this supposed to mean? I am compiling a DLL and running into this when I use REGSVR32 to register the dll.