The application failed to initialize properly (xc0150002).
I need to be able to run my application without installing the VC++ 2008 SP1
Redist package or using an installer. I placed the redist libraries and
manifests in the same folder as my application files. This worked fine with
VC++ 2008.
With VC++ 2008 SP1 it appears that the policy files that are installed by
VC++ 2008 SP1 Redist package are required (see example below). It appears
that bindingRedirect is needed for VC++ 2008 SP1. Is there a way to input
this via Additional Manifest Dependencies or some other method? As I
mentioned I can't use a installer or the VC++ 2008 SP1 Redist package.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32-policy"
name="policy.9.0.Microsoft.VC90.MFCLOC" version="9.0.30729.1"
processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.MFCLOC"
processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
<bindingRedirect oldVersion="9.0.20718.0-9.0.21022.8"
newVersion="9.0.30729.1"/>
<bindingRedirect oldVersion="9.0.30201.0-9.0.30729.1"
newVersion="9.0.30729.1"/>
</dependentAssembly>
</dependency>
</assembly>
Thanks!
The magic incantation you need is to define
_BIND_TO_CURRENT_VCLIBS_VERSION. You need to define this in all modules
are are compiled. (You'll know if you were successful when the "21022"
reference goes away)
Dave Connet
(Been there, lost some hair)
Thank you for the reply and information.
Should I add
_BIND_TO_CURRENT_VCLIBS_VERSION=1
in Preprocessor Definitions?
Thanks!
Thank you for the reply and information.
Should I add
_BIND_TO_CURRENT_VCLIBS_VERSION=1
in Preprocessor Definitions?
Thanks!
> Hello David,
>
> Thank you for the reply and information.
>
> Should I add
>
> _BIND_TO_CURRENT_VCLIBS_VERSION=1
>
> in Preprocessor Definitions?
>
> Thanks!
That's usually how I do it. I have also set it in my stdafx.h file. The
drawback to that is when you include code that does not include that header
(and set the properties of that file to not use precompiled), things break
again. (Some of my projects include some old .c files)
Since I use properties in my VC9 builds, I actually set it in the
preprocessor settings of my lowest property (I name that one
'Common.vsprops') Using properties helps maintain settings across multiple
projects - makes life much easier when you have many projects in a single
solution! (I then have release/debug properties - those include 'Common'.)
Dave
I hope what I am trying to do is possible with VS 2008 SP1. As I mention
prior to SP1 I could run with run time libraries and manifests in the same
folder. I didn't need to install anything else. Because of the nature of
the product it needs to run without installing the run times on the end user
machine.
I am using third party dlls so this has complicated the situation. All I
can say is this change has caused me a lot of time and grief.
-Steve