In previous version's of Windows Server we were able to simply drag and drop assemblies into GAC folder which wasn't recommended at all, however being in a development environment (Windows Server 2012) when I tried to drag and drop a DLL into GAC, I received this error,
Now if you want to install assembly to GAC following steps,
- Assuming you are new to Windows Server 2012, Move your mouse pointer to right bottom of your screen just next to Date & Time.
- Click on "Search" tile.
- Now enter "cmd" in search text box.
- Most likely you will see two apps named as "Command Prompt" and "Visual Studio Command Promp...".
- If you will right click on "Visual Studio Command Promp.." it will give you few options at bottom of screen as show in picture below,
- Click on "Run as administrator" and press "Yes" for typical dialogue appears each time you try to start a processes as administrator as security confirmation.
- Now type down this command,
cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
- Copy your assembly to folder directory,
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
- Once assembly is copied you can use following syntax to install assembly to GAC,
gacutil /i mySolution.myProject.dll
an IIS reset will be produced as a result of above command so be careful as if you might break any on going process
That's it. Your assembly is installed, you can follow the procedure as many times as you want.
For more information please check this MSDN link out: http://msdn.microsoft.com/en-us/library/ex0ss12c(v=vs.80).aspx