Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

.NET 2.0 Registration Problem


3 replies to this topic

mpento

mpento
  • Full Members
  • 38 posts

Posted 13 December 2006 - 16:06

Hello Folks,

I am struggling with an apparent registration problem with a .NET 2.0 dll using InstallShield 12. I will try and lay out the problem as best I can here and hopefully someone will have a suggestion of what I might be missing.

To simplify, I have these two components:

1. Server.dll (.NET 2.0 assembly)
2. Client.dll (Visual Basic 6.0 COM dll)

During the build process, after the Server.dll has been built, I generate a type library called "Server.tlb" which is a required reference for building the Client.dll COM component.

All 3 of these files are installed on the target system using InstallShield 12, alon with Interop.Client.dll. In the install project, the Client.dll and the Server.tlb file are set to "COM Extract at Build"

Once the package is installed on the target system, the Server.dll is broken until you manually go to the command line and type:

regasm Server.dll /tlb

This registers the assembly and creates the type library again. Everything works fine after that.

I am not sure what I am doing wrong in the install project. It is important here to note that all ".NET ..." options in the component properties are set to "No". I honestly dont know that much yet about .NET, so, I am not exactly sure when to use ".NET Installer Class", ".NET COM Interop" and ".NET Precompile Assembly" options.

If anyone can shed some light on this problem, I would greatly appreciate it.

Thanks,
Mike
Michael J. Pento

Independent InstallShield Contractor
mjpento@NO_SPAM.comcast.net

russellperry

russellperry
  • Full Members
  • 31 posts

Posted 13 December 2006 - 17:25

I've been registering my interops with a custom action that calls regasm from the binary table, for instance:

An entry in the Custom action table:

Action:
RegComInteropLibrary

Type:
2

Source:
RegasmExeBinaryEntry

Target:
"[INSTALLDIR]\My.Interop.Library.dll" /tlb


...and then add regasm.exe to an entry in the binary table, "RegasmExeBinaryEntry" etc.

Hope this helps.

Edited by russellperry, 13 December 2006 - 17:25.


mpento

mpento
  • Full Members
  • 38 posts

Posted 13 December 2006 - 20:21

Your reply is much appreciated.

This is an excellent suggestion, but I tried this by request of one of the developers a few days ago.

The problem is, I create the .tlb file on the build system, as the Client.dll requires the tyep library to build.

On the target machine, if I manually create the type library from a Custom Action, I end up with a broken Client.dll because the type library used on the target system is not the same as that employed on the build machine.

I have also tried using a CA just to regasm the Server.dll, but still distributing my build system type library for use by the Client.dll. This ends in a situation where the Server.dll is broken.

Thanks,
Mike
Michael J. Pento

Independent InstallShield Contractor
mjpento@NO_SPAM.comcast.net

russellperry

russellperry
  • Full Members
  • 31 posts

Posted 13 December 2006 - 20:40

Have you tried not using the /tlb option? This will register the interop but not create a typelib. If you're installing the assemblies to the GAC, I think this is all you need to do.