I have the MySQL Connector/NET installed on my PC. I modified the source code and recompiled one of the dlls (MySQL.Data.dll). With the program already installed, how can add this dll to the Global Assembly Cache?
If your answer involves using gacutil.exe, please tell me where I can find it on my PC or where I might download it. Thanks!
You can put it in the GAC but unless you have access to the private key with which it was originally signed, the installed program(s) will not recognize it.
Open Windows Explorer (WindowsKey+E). Go to c:\windows\assembly
. Open a second explorer window and drag and drop your assembly to the first window.
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe" /i "strongnamed.dll" /f /nologo
Very simple: Start-> Programs-> Microsoft Visual Studio 2005/2008 -> Visual Studio Tools ->
Visual Studio 2005/2008 command prompt
a cmd appears, where you can type gacutil.
It also shows you the path where it resides:
C:\Program Files\Microsoft Visual Studio 9.0\VC> on my computer.
- Open Visual Studio Command Prompt
First open Visual Studio Command Prompt (For Visual Studio 2010 the path is Programs --> Visual Studio 2008 --> Visual Studio Tools --> Visual Studio 2008 Command Prompt )
All the files mentioned in the following steps will be created in the Visual Studio 2010 Command Prompt Path.
- Generate a KeyFile
sn -k keyPair.snk
- Get the MSIL for the assembly
ildasm SomeAssembly.dll /out:SomeAssembly.il
- Rename the original assembly, just in case
ren SomeAssembly.dll SomeAssembly.dll.orig
- Build a new assembly from the MSIL output and your KeyFile
ilasm SomeAssembly.il /dll /key=keyPair.snk
- Install the DLL in to the GAC
gacutil -i SomeAssembly.dll