Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My C++ application was running on windows XP using shared run-time assemblies version 9.0.30729.1. But recently I installed new C++ redistribute package and it deployed newer version of run-time assemblies version 9.0.30729.6161.

In Winsxs\policies directory this new policy file also deployed by new C++ redistribute package.
XML
<?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.ATL" version="9.0.30729.6161" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.ATL" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/>
<bindingRedirect  oldVersion="9.0.20718.0-9.0.21022.8" newVersion="9.0.30729.6161"/>
<bindingRedirect  oldVersion="9.0.30201.0-9.0.30729.6161" newVersion="9.0.30729.6161"/>
</dependentAssembly>
</dependency>
</assembly>

After this new Visual C++ 2008 Redistributable installation my program shows "This Application Has Failed to Start Because the Application Configuration Is Incorrect" error. But if I delete above policy file it works fine. Any idea?
Posted
Updated 11-Apr-13 21:05pm
v2
Comments
Richard MacCutchan 12-Apr-13 4:08am    
Did you rebuild your project with the new runtimes in place?

Looks like the installer overwrote the "1" with "6161"

9.0.30729.1
9.0.30729.6161

My solution is to use static linking to avoid such mess.
 
Share this answer
 
Comments
Nayana Adassuriya 12-Apr-13 3:56am    
Static linking is not a recommended method. And for large scale project with multiple DLLs conflict by the static linking. Run time assemblies normally not overtiring one by other. Those just forward usage by policies.
KarstenK 12-Apr-13 4:41am    
Large scale projects are with a complete installer which should handle the dll mess.
In smaller projects is static linking an easy way to make the setup an "easy fruit" and avoid such problems.
You can adjust the tolerance to this in the manifest file(s) for your application. I'll let you chase MSDN for this.

If you use external manifest files, you can fix your existing app without recompiling with the 'redirect' technique which is described here[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900