.net – How to install files in the assembly in Windows Server 2008

assembliesnetwindows-server-2008

Typically what I used to do is drag and drop the files onto the GAC folder.
This works in Windows 2000 & 2003, however when I try to do this in Windows Server 2008 I get 'Access is denied'.

The user that is doing this is a local administrator.

The only reference I can find to this is:
Forum link

Is there another way to achieve this?

Note:
I tried running explorer as the administrator, but I get the same error.

Edit: Ideally whatever solution there is should not turn off UAC, or install any software development kit. (So it can be applied to production servers).

Edit: Does anyone have anymore thoughts on this? I've currently on gone with disabling UAC in dev, however this is unacceptable in live.

Best Answer

This is a UAC issue in server 2008, some people have recommended stopping UAC, I would not recommend this on a production server. The answer is to use gacutil.

You do not need to install the SDK to run this on a production server, the exe and its config file can be deployed from a development machine (and removed after use if desired).

Place gacutil.exe and gacutil.exe.config into the WINDOWS\Microsoft.NET\Framework\ folder specific to the version of the framework you are using.

Then start a new instance of the command line using "Run as administrator"

Navigate to the C:\WINDOWS\Microsoft.NET\Framework.... folder where you have deployed gacutil

Then run: gacutil.exe /i

Hopefully this should resolve your issue (it has worked for me).

Good luck.