This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Registering .NET DLLs
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
10:28 AM
Registering .NET DLLs
Hello all,
I've been having a problem for the past few days trying to register a .NET DLL for COM interop using InstallShield 2008.
InstallShield offers the option to go into the properties of the file and the .tlb file and click "self register", I've done this. However it still does not work!
A colleague created a VisualStudio installer and it works for registering the DLL. Also, the DLL seems to work on any machine that the DLL is built on (i.e. take the VS solution to another machine, build it and it will register correctly).
At first we assumed it was a dependency issue dealing with Visual Studio being on the machine the DLL runs on, but since my colleage created the installer from Visual Studio, we've tried installing on machines without VS, and had success -- but still not with the InstallShield created setup.exe.
Has anyone run across these issues in the past? Any suggestions?
DS
I've been having a problem for the past few days trying to register a .NET DLL for COM interop using InstallShield 2008.
InstallShield offers the option to go into the properties of the file and the .tlb file and click "self register", I've done this. However it still does not work!
A colleague created a VisualStudio installer and it works for registering the DLL. Also, the DLL seems to work on any machine that the DLL is built on (i.e. take the VS solution to another machine, build it and it will register correctly).
At first we assumed it was a dependency issue dealing with Visual Studio being on the machine the DLL runs on, but since my colleage created the installer from Visual Studio, we've tried installing on machines without VS, and had success -- but still not with the InstallShield created setup.exe.
Has anyone run across these issues in the past? Any suggestions?
DS
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
12:16 PM
dschroeder wrote:
Hello all,
I've been having a problem for the past few days trying to register a .NET DLL for COM interop using InstallShield 2008.
InstallShield offers the option to go into the properties of the file and the .tlb file and click "self register", I've done this. However it still does not work!
A colleague created a VisualStudio installer and it works for registering the DLL. Also, the DLL seems to work on any machine that the DLL is built on (i.e. take the VS solution to another machine, build it and it will register correctly).
At first we assumed it was a dependency issue dealing with Visual Studio being on the machine the DLL runs on, but since my colleage created the installer from Visual Studio, we've tried installing on machines without VS, and had success -- but still not with the InstallShield created setup.exe.
Has anyone run across these issues in the past? Any suggestions?
DS
I remember the progress of register .NET active X or COM DLL is not the same as normal activeX/COM. You better read on how the normal .NET com objects register 😛
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
12:42 PM
Is this a Basic MSI project?
If so, have you looked at the component .NET COM Interop property?
If so, have you looked at the component .NET COM Interop property?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
01:04 PM
This is indeed a basic MSI project.
The property that you're referring to... are you meaning the ".NET framework locations" entry area under (Tools -> Options -> .NET)? If so, the entries appear to be correct:
RegAsm:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe
InstallUtilLib.dll:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtilLib.dll
Every machine I've tried my install on, it has had .NET v2.0.50727, and still does not register. The only machines it registers correctly on are those where the DLL is built (compiled), or the Visual Studio installer my colleague built is used. Also, please know that when she built that project, all she had to do was go to the properties and "enable for com interop" option.... she did nothing fancy.
I've been pulling my hair out over this for two days now, haha!
---EDIT---
It may also be useful to know that In Tools->Options->Preferences I have the following settings:
---Self Registration
----- ISSelfreg (have tried the selfreg option though)
----- Com extraction will occur during the build
The property that you're referring to... are you meaning the ".NET framework locations" entry area under (Tools -> Options -> .NET)? If so, the entries appear to be correct:
RegAsm:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe
InstallUtilLib.dll:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtilLib.dll
Every machine I've tried my install on, it has had .NET v2.0.50727, and still does not register. The only machines it registers correctly on are those where the DLL is built (compiled), or the Visual Studio installer my colleague built is used. Also, please know that when she built that project, all she had to do was go to the properties and "enable for com interop" option.... she did nothing fancy.
I've been pulling my hair out over this for two days now, haha!
---EDIT---
It may also be useful to know that In Tools->Options->Preferences I have the following settings:
---Self Registration
----- ISSelfreg (have tried the selfreg option though)
----- Com extraction will occur during the build
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
01:33 PM
Egghead wrote:
I remember the progress of register .NET active X or COM DLL is not the same as normal activeX/COM. You better read on how the normal .NET com objects register 😛
You are right Egghead. .NET DLLs register using a different register service (RegAsm.exe from the .net framework) instead of regsvr32.exe . I've found that you're also supposed to include the .tlb file, and mark it to self register as well.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
03:10 PM
dschroeder wrote:
The property that you're referring to... are you meaning the ".NET framework locations" entry area under (Tools -> Options -> .NET)? ...
No, I'm referring to the Component property setting.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
04:51 PM
If all else fails, you always run the regasm.exe in the .Net Framework with the necessary parameters to register your DLL. It may bring up a DOS window, but it works.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
04:56 PM
Try using Dependency Walker www.dependencywalker.com to profile the registration process. This should let you know if it is a dependency issue.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
05:15 PM
DanGalender wrote:
No, I'm referring to the Component property setting.
Dan... You may be my new superhero.
I never even knew that pane of information was there - It wasn't visible until I started doing some poking around.
You're right. The "Com Interop" value was set to "No" even though I had right clicked the file and said to self-register.
The registration worked!
I've only tried it on one machine so far (I need to build another machine to test it on) so I can't be 100% sure it's not a dependency issue with something risidual on that machine, but you've gotten me further than I've been in days --- thank you so much.
DS
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
05:17 PM
MGarrett wrote:
Try using Dependency Walker www.dependencywalker.com to profile the registration process. This should let you know if it is a dependency issue.
I had tried Dependency Walker previously. It didn't have any errors.
It's actually a really simple DLL (just a connection string to a database with some return values)...
Thanks for trying though! Dan probably got my fix action in his post.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 05, 2008
06:29 PM
dschroeder wrote:
Dan... You may be my new superhero.
Can I have a cape, please?
I shovel really well.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)