I am facing the following issue when deploying a com-exposed assembly to my client's. The COM component should be consummed by a vb6 application. Here's how it's done
1) I have one c# project which has a class with a couple of methods exposed to COM
2) The project has references to multiple assemblies
3) I compile the project, generating a folder (named dllcom) that contains the assembly plus all the referenced dlls
4) I include in the folder a .bat which does the following:
regasm /u c:\dllcom\LibInsertador.dll
del LibInsertador.tlb
regasm c:\dllcom\LibInsertador.dll /tlb:c:\dllcom\LibInsertador.tlb /codebase c:\dllcom\
pause
5) After running the bat locally in many workstations of my laboratory, i'm able to consume the generated tlb from my vb6 application without any problems. I'm even able to update the dll by only means of running this bat, without having to recompile the vb6 application. I mean that im not having issues of vb6 fiding and invoking the exposed com object.
The problem
6) I send the SAME FOLDER to my client
7) They execute the .bat locally, without any errors
8) They execute the vb6 application, vb6 finds the main assembly, the .net code seems to run correctly (it's even able to generate a log file) until it has to intantiate it's first referenced assembly. Then, they get the following exception:
"Could not load type 'GYF.Common.TypeBuilder' from assembly 'GYF_Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
Where "GYF.Common" is an assembly referenced by LibInsertador and TypeBuilder is a class contained in GYF.Common. GYF.Common is not a signed assembly and it's not in the GAC, just in the same folder with Libinsertador. According to .net reflector, the version is correct.
¿Any ideas about what could be happening?