How to register a dll into GAC with Installshield

2019-09-15 02:57发布

问题:

I have installshield 2016 premier and I have a .Net dll that uses a com dll. My application is a plugin so the main exe (its not my exe), is looking mydll in windows even myplugin is in program files. Manually when I use "gacutil.exe -i mydll.dll" it works. Then the dll is not need to be in windows folder.

So I tried also regasm but it did not work. So i have to register mydll into gac somehow. The target machine has not gacutil.exe so i cannot call basically from command.

I looked at how installshield can do that but it did not work as well. I checked "self register" and "com extract at build" yes but did not work and i got an error while installing (because its not a pure com dll, it has only referenced a com dll with embed interop type). When I choose .Net Com Interop settings Yes, then installshield it not build my setup file.

So Is there anyway to register this dll during/end of installation?

Update: When i do "build and scan dependencies", it cannot find anything!

回答1:

Use "Support files" functionality of InstallShiled and place gacUtil or installUtil into "Support files" folder and run the utility at the end of the installation. This may help to solve the problem. This is same like running from command prompt. Refer the link for more details