Registering Free COM Interop: the application did not start because its side-by-side configuration is incorrect

Background. I have a COM Wrapper assembly called ComWrapper.dll written in C # and a Visual Basic 6 application called Project1.exe. I added the Project1.exe.manifest file (the contents of which are shown below), and I get the error message "the application did not start because its side-by-side configuration is incorrect ..

<?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 greatly appreciated.

+5
source share
2 answers

You need to use sxstrace.exe to determine the actual cause of the error, because the text of the error message (full) tells you so. Here is what is wrong:

INFO: Parsing manifest file

C:. \ Temp \ SxS \ Project1.exe.Manifest

INFO: The manifest identifier definition is Project1.exe, processorArchitecture = "x86", type = "win32", version = "1.0.0.0".

INFO: Link: ComWrapper, processorArchitecture = "msil", version = "1.0.0.0"

ERROR: Line 9: The clrClass element is displayed as a child of the urn: schemas-microsoft-com: asm.v1 ^ dependAssembly element, which is not supported by this version of Windows.

The problem is that the dependentAssembly element should not contain a full description of the assembly - it is used only to indicate the link. You must provide a separate component manifest file for this assembly, which then describes the exported COM classes through clrClass . This is described in more detail in this MSDN article .

+6
source

This error may be due to a typo in the configuration file. Check your app.config file and find typos.

0
source

Source: https://habr.com/ru/post/1315013/


All Articles