I have an application (Delphi Native code) that needs to access a .NET assembly (exposes a few COM classes. I want to do this using side by side assemblies and manifests. I have done this with a test .NET assembly, but am having a problem with the assembly I need to access.
When the assembly is registered, I can instantiate the COM class. As soon as I unregister the assembly, and try to access side by side I get the above error. My native application has an application manifest, which has a simple dependency to the assembly.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32"
name="TestApplication.exe"
version="1.0.0.0"/>
<dependency>
<dependentAssembly>
<assemblyIdentity
name="TestAssembly"
version="1.0.0.0"
processorArchitecture="x86"
publicKeyToken="xxxxxxxxxxxxxxxx"
type="win32"/>
</dependentAssembly>
</dependency>
</assembly>
My Assembly manifest, which I have embedded as a resource into my .net assembly is the following :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
name="TestAssembly"
version="1.0.0.0"
processorArchitecture="x86"
publicKeyToken="xxxxxxxxxxxxxxxx"
type="win32"/>
<clrClass
clsid="{F3F1623D-DB4A-4152-9A5D-5A465AD3A318}"
progid="TestAssembly.MyObject"
threadingModel="Both"
name="TestAssembly.MyObject"
runtimeVersion="v2.0.50727">
</clrClass>
<file name="TestAssembly.dll">
</file>
</assembly>
The manifests seems to be setup correctly. If I change the application manifest's dependency name, version or public key token (the one in the example is not the one i have in my code btw), I get the usual SxS error about the application configuration is incorrect.
I have this working on another (admittedly simpler) .NET assembly, but cannot figure out what is wrong. Problem is I'm not sure what the error means.