Background. I’ve got a COM Wrapper assembly called ComWrapper.dll written in C#, and Visual Basic 6 application called Project1.exe. I’ve added the Project1.exe.manifest file (contents of which are shown below), and I’m getting an error that says “the application has failed to start because its side-by-side configuration is incorrect. Here’s my configuration.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32"
name="Project1.exe"
version="1.0.0.0"
processorArchitecture="x86" />
<dependency>
<dependentAssembly>
<assemblyIdentity name="ComWrapper" version="1.0.0.0" processorArchitecture="msil"></assemblyIdentity>
<clrClass clsid="{3ac3d04e-1f83-4a27-b516-95e38126685d}" progid="MyComObjectNamespace.myclass" threadingModel="Both" name="MyComObjectNamespace.myclass" runtimeVersion=""></clrClass>
<file name="ComWrapper.dll" hashalg="SHA1"></file>
<dependency>
<dependentAssembly>
<assemblyIdentity name="mscorlib" version="2.0.0.0" publicKeyToken="b77a5c561934e089"></assemblyIdentity>
</dependentAssembly>
</dependency>
</dependentAssembly>
</dependency>
</assembly>
Any help would be much appreciated.
You need to use sxstrace.exe to determine the actual cause of the error, as the (complete) error message text tells you to do. Here’s what it is wrong:
The problem is that
dependentAssemblyelement should not provide a complete description of the assembly – it’s only used to indicate a reference. You have to provide a separate component manifest file for that assembly, which then describes exported COM classes viaclrClass. This is described in more detail in this MSDN article.