Thursday, May 7, 2009

The application failed to initialize properly (0xc0150004).


The application failed to initialize properly (0xc0150004). Click on OK to terminate the application.

This can be seen when trying to debug an application on Visual Studio 2008 ... apparently as well as in Visual Studio 2005 !
What happened?
In the debugging properties of the VS Project Configuration you will find an option to merge the environment.
This is after the entry Environment where you can specify additional environment variables.
The pitfall is that the merge env setting also merges the environment helping visual studio to find its debug libraries deeply hidden in the windows installation.

So if you select NO....(= dont merge environment) no more debugging is possible....

We can only wonder about what microsoft has thought about this implicit disable debug property which is caused by some invisible environment variables essential to debug mode.
So instead of showing us the essential merged environment variables we are left in the dark.....