Windows Application presents startup error (0xc0150002) on some systems

Posted on 2011-10-18
Last Modified: 2013-12-03

I have a Visual Studio 2005 application that runs on some systems but not others.  The application ships with 4 dll files that reference other dlls.  These called dlls should be part of the system environment, which is the case on the machines that work.

As a temporary fix, we built the exe so that all the dll code was contained in it.  It runs fine under that circumstance. But we don't wish to leave it that way.  

I have two systems set up for testing - one that works and one that doesn't.  Both are Windows7-64 OS.   Also, I had a third non-working Windows7 disk, but installing Visual Studio 2011 beta seemed to fix it.  I can't use this approach for deployment however....

I ran sysinfo and compared the process internals on the working system with the non-working system.  The first thing that jumps out is that the path is different between the two.  Although they have pretty much the same folders in the path list, the order is not the same between them.

There may be other differences as well, this is just the first one I noted.

What can I do to isolate this somewhat random error and fix it ion standard win7 machines?

Thank you
Question by:markdolar
    LVL 32

    Expert Comment

    the 0xc0150002 error is an initialisation error mostly caused by missing manifests. you probably could solve them by copying the .manifest files from your built into the directory where the exe resides. you might think of embedding the .manifests into your executables. i don't know whether that already was possible with vs2005 but surely with vs2008.

    note, looking into the eventvwr log should give more details.


    Author Comment

    Ok - looking in the event viewer, I think I found the problem.    The version of the manifest is 9 on the working system and 8 on the non-working system.  The software event reported that the program was looking for a file in the 9 manifest when it crashed.

    So, I am ready to take a remedial step, which is adding manifest 9, but would like to go about it in the correct fashion.  

    Is there a specific place in Microsoftland where someone would get the manifest from?  Can I get the correct ones somewhere in visual studio - if so, how do I track when my programmer upgrades and inadvertently breaks it again?

    If I just copy it from the working machine. what is the proper method for placing it on the target, especially considering that the path attributes between the working and non-working processes were different?

    Building the manifest into the code itself is the best option I think, but the reality is that I need to fix this before that can happen.  Any additional advice appreciated; first response was spot on.

    LVL 32

    Accepted Solution

    unfortunately i know only manifest handling for (unmanaged) c++ and mfc projects in vs2008. here you can embed the manifest files (which automatically was built) into the executable like a resource.

    i also achieved once to add the manifest settings for a specific version of a control into the application manifest which then doesn't need the control to get registered anymore.

    when i stored the manifest settings into a .manifest file with same name as the application i could add this file to an older version of the program and it also doesn't need the control to be registered anymore.

    so, as far as i remember, the rule is that a .manifest file with same name as the application exe - for example myapp.exe.manifest - was used if existing in the same folder than the application. if no manifest given it uses the embedded manifest. if still no manifest it uses defaults from target system which is less likely to work. things go worse if you have many dependencies with other manifested dlls.

    but manifest creation changed with every version of visual studio and also was different for the supported languages and perhaps target os versions.


    Author Closing Comment

    diagnosis was good, but only partial solution provided

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now