NCIT
asked on
Register DLL in GAC Programatically
How can we install a DLL into the GAC Assembly programatically through either a process or file action via visual studio VB 2008? We have tried many ways and need your help!
The process runs on startup within a distributed windows forms application. We would like to overwrite the DLL if it already exists at this point.
Basically the only way we get it to install is by dragging it into the windows assembly folder manually. The .NET gacutil on the clients results in "Unknown Error" always.
The process runs on startup within a distributed windows forms application. We would like to overwrite the DLL if it already exists at this point.
Basically the only way we get it to install is by dragging it into the windows assembly folder manually. The .NET gacutil on the clients results in "Unknown Error" always.
Which flags are you passing to GACUTIL?
ASKER
workingdir: C:\WINDOWS\Microsoft.NET\F ramework\v 2.0.50727
filename: gacutil
Args: -if "path to dll"
filename: gacutil
Args: -if "path to dll"
ASKER
Sorry I meant this working directory on the client (.net 3.5 is required by the installer for the client application):
C:\WINDOWS\Microsoft.NET\F ramework\v 1.1.4322
Also fyi, our DLL and application are both tageting .net 3.5
Just using the -if flag
C:\WINDOWS\Microsoft.NET\F
Also fyi, our DLL and application are both tageting .net 3.5
Just using the -if flag
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Following up incase others have this issue. We switched from using Process > REGASM to using Assembly / RegistrationServices class. When users had .net 4 installed it was failing with REGASM. I think this is a better solution than running the command line tool.