0

I'm just trying to build 64 bit version of an existing program (EXE with some dependent DLLs). Since it was very easy under Linux (just recompile it), I was optimistic it could be somehow similar under Windows. Unfortunately it is not...

After starting my newly compiled EXE, I get an error message

The application has failed to start because its side-by-side configuration is incorrect...

Tracking down the reason for it I made a SxS trace which shows following error message:

ERROR: Two assemblies have the same assembly name with different version.
Assembly 1: C:\Windows\WinSxS\manifests\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac.manifest.
Assembly 2: INFO: Manifest found at C:\Windows\WinSxS\manifests\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac.manifest..

So..what does this mean? And how can I resolve the problem? Installing the VS2010-redistributable package for x64 was not the trick, here installer complains about a newer version that is already installed...

The Manifest file mentions some X86...is this the reason? If yes: how can I find out on which X(& DLLs it still depends?

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="0.64.1.0" processorArchitecture="x86" name="Controls" type="win32">   </assemblyIdentity>
  <description>wxWindows application</description>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>
Elmi
  • 5,899
  • 15
  • 72
  • 143

1 Answers1

1

Your application manifest specifies x86 architecture and has two entries for comctl32.

You should specify x86 for your 32 bit build, and amd64 for your 64 bit build. And you should list comctl32 exactly once. For the dependent assembly architecture you can specify * if you wish, but personally I prefer to be explicit.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • OK, I removed all link-references to comctl32.lib, but the problem still persists... – Elmi Oct 15 '14 at 11:31
  • That's not what I said to do. – David Heffernan Oct 15 '14 at 11:33
  • David Heffernan: All DLL's and the EXE already ARE 64 bit builds! – Elmi Oct 15 '14 at 11:42
  • David Heffernan: OK, then this is a more general problem (may be of my understanding): I did not create the manifest, VS2010 is doing that automatically for me (and would overwrite it every time I rebuild the EXE). The EXE is located on an completely different location than the manifest, so I think Windows will not be able to find it. And: I plan to deploy just the exe, without any manifest...so how can this help? – Elmi Oct 15 '14 at 11:53
  • The manifest is linked into your executable. I'm sure that VS would not make that manifest. It's utterly broken. – David Heffernan Oct 15 '14 at 11:55