views:

7557

answers:

6

When I drag & drop a dll to the assembly folder on vista, I get the error "Access is denied: mydll.dll". How can I bypass the error message and add my dll to gac?

+3  A: 

My guess would be that you have to do it as an administrator...try either disabling UAC, or using gacutil.exe to add your assembly.

Jonas
+1  A: 

Use runas command to run gacutil as a user with local admin rights to register the dll to GAC.

Gulzar
+2  A: 

How can I locate gacutil.exe? It does not seem to appear in my windows folder.

Serhat Özgel
Run Visual Studio 2005 command prompt (Programs> Visual Studio 2005>Visual Studio Command Prompt). That will set the proper paths and you should be able to run gacutil.
Gulzar
Or you can browse to this folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
Gulzar
A: 

You may not locate gacutil.exe in your windows folder while using vista. It's not included because of vista's "Logo Program blah blah" thing. Try to use windows installer to add your assemblies into gac. This is the recommended way.

And never forget this traditional ogrish proverb: "Bi siktir git cay koy".

aksangrav
A: 

You can do that with gacutil.exe. It is located in:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

It is only there though, if you installed the .NET SDK (not just the .Net Redistributible). But you can copy it from your developer machine.

dummy
A: 

The assembly (dll) also needs to be strongly named if it's going to reside in the GAC.

http://msdn.microsoft.com/en-us/library/wd40t7ad(VS.80).aspx