views:

47

answers:

2

We have one assembly that is used by the VB6 executable via COM Interop. This assembly uses other .NET assembly (not available for COM). We have defined a .manifest for our VB6 application, so that we can use the .NET assembly without registration. We also defined a .config for our VB6 application, with probing settings, to look in subdiretories ("bin") for assemblies.

If we put all .NET assemblies in the specified subdiretory ("bin"), our application starts successfully and we can work with it until the Interop-Assembly calls some code of the other assemblies. Then we get a runtime error '429' : ActiveX component can't create object.

When we drop the .config file and put all files in the same directory, the application works as expected.

Is it possible to use probing for .NET Assemblies that are used by a VB6 executable? Is there a way to setup up probing corretly so that the other assemblies are located successfully?

.config

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
         <probing privatePath="bin"/>
      </assemblyBinding>
   </runtime>
</configuration>
+1  A: 

Well, looks like your .config file isn't working. That could happen when you try to debug the VB6 application from the VB6 IDE, the CLR will look in the wrong directory for the .config file. The ultimate tool you need to troubleshoot this is fuslogvw.exe, it shows you where the CLR looked for the assembly.

Hans Passant
The Interop-Assembly is found using probing, but the dependant assemblies are not resolved. I will give fuslogvw.exe a try.
Jehof
A: 

Hi Jehof.

May I ask you, how you did create the .manifest file for your VB6 application? I am also in the same scenario: A VB6 Executable, a COM Interop .NET assembly which uses another .NET assembly which is not COM visible.

I can create a .manifest for the VB6 EXE with MMM (Make My Manifest) when just using COM DLLs. But I cannot find a way to create a .manifest when using COM Interop assemblies. I read alomst hundreds of pages, used google for an answer, tried mt.exe, regsvr42 and genman32.

If you could tell me how exactly you have created the .manifest file for your VB6 EXE (which uses the Interop assembly) I would be very thankful.

Best regards and thank you in advance, Charles