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 COM Interop / Register NET dll


4 replies to this topic

maxk

maxk
  • Full Members
  • 38 posts

Posted 25 February 2014 - 05:14

Hello,

 

I'm using Installshield 2012 and trying to register .NET DLL files.

Typically, in the component I use .NET COM Interop option (select to "Yes") to register the NET files.

However, I get the following error "Error -6210: An error occurred building COM .NET Interop information for Component.".

Somehow installshield doesn't think this dll is not NET dll.

 

Here is the cause,

"During the build process, InstallShield calls the Microsoft file regasm.exe on the .NET .dll to create a registry (.reg) file. After the .reg file is created, the .reg file is imported. The resulting registry entries are then stored in the Registry table of the MSI database. If either of these steps fails, this error occurs."
 

Are there any other ways to register NET files without using .NET COM Interop option? 

I also tried to create a custom action (MSI type 34) to register ("[WindowsFolder]\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe")

but getting this error " "ERROR 1722: There is a problem with this Windows Installer package."

This custom action actually worked fine with very old version of Installshield.

 

Thanks in advance,

M


Edited by maxk, 25 February 2014 - 16:24.


tnand53

tnand53
  • Full Members
  • 23 posts

Posted 25 February 2014 - 18:05

The best way to run regasm is to use launchappand wait in installscript  or launch process in c++. I myself am using it one project and its working.

fine. i hope you have given all parameters for regasm such as code base tlb file etc...



maxk

maxk
  • Full Members
  • 38 posts

Posted 27 February 2014 - 16:08

Hi tnand53,

 

Thanks for your response.

I was hoping there is a way to accomplish within installshield 2012 but I couldn't find it.

I'm still not sure why my custom action is not working,

"[WindowsFolder]\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" "[INSTALLDIR]\mydir\NET.dll" /tlb /codebase /register

 

Anyway, our dev team wrote a excutable file to register .NET files at the end of install.

 

Thanks again.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 February 2014 - 13:39

Regarding the build error: make sure you have selected the correct .NET version and RegAsm location under Tools > Options > .NET

 

Regarding the custom action error: Select "ignore exit code" because EXEs almost never return any exit value that Windows Installer can handle properly (Windows Installer expects 0 for success, any other value will be seen as error)



maxk

maxk
  • Full Members
  • 38 posts

Posted 28 February 2014 - 16:22

Hi Stefan,

 

If the .NET codes are written using a generic type instance, installshield doesn't think they are .NET dlls which mean COM doesn't support generic type.

Consequently, generic types cannot be used directly for COM interop. So this case I coudn't use .NET COM Interop option

 

Everything runs fine with EXE custom action.

I had problems running below custom action,

"[WindowsFolder]\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" "[INSTALLDIR]\mydir\NET.dll" /tlb /codebase /register

 

Thanks,

M


Edited by maxk, 28 February 2014 - 16:23.