Hi there.
I have a .NET 2.0 assembly which has been used in many SharePoint projects, running on W2K3 boxes, which I'm having trouble installing on a W2K8 box. Normally, on a W2K3 box,I can get away with dragging the assembly into the C:\Windows\Assembly folder and it will be installed, no problem. However, I see that things are a bit different in W2K8!
If I try to drag the assembly into the GAC, I get an error message indicating that I can't do that. Ok, so I ran Windows Explorer with 'Run As Administrator', but that made no difference.
I looked for .Net Configuration in Control Panel, but that is not there.
As a last resort I did a 'dir gacutil.exe /a/s/p' in a command prompt, but that returned nothing. There is no Visual Studio installed on the W2K8 box, thus I assume that's the reason for no gacutil.exe.
So my questions is, what is the preferred method of installing an assembly into the GAC in W2K8? Has anyone else had the same problem?
Thanks. Jas. | | Jason Evans | First of all ensure that you're getting administrator priviledge to install it into GAC. and of course the assembly must have strong name as well.
And FYI.NET Framework 2.0 SDK which includes gacutil.exe along with other.NET configuration tools:http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.- Edited byFigo FeiMSFT, ModeratorWednesday, July 02, 2008 2:26 AMstrong name
- Proposed As Answer bySyed Abdul Rahman Wednesday, July 02, 2008 7:35 AM
- Edited byFigo FeiMSFT, ModeratorWednesday, July 02, 2008 2:20 AMadd admin cause
- Marked As Answer byFigo FeiMSFT, ModeratorFriday, July 04, 2008 1:36 AM
-
All RepliesWednesday, July 02, 2008 2:17 AM Figo FeiMSFT, Moderator     First of all ensure that you're getting administrator priviledge to install it into GAC. and of course the assembly must have strong name as well. And FYI.NET Framework 2.0 SDK which includes gacutil.exe along with other.NET configuration tools: http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=enThanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help. - Edited byFigo FeiMSFT, ModeratorWednesday, July 02, 2008 2:26 AMstrong name
- Proposed As Answer bySyed Abdul Rahman Wednesday, July 02, 2008 7:35 AM
- Edited byFigo FeiMSFT, ModeratorWednesday, July 02, 2008 2:20 AMadd admin cause
- Marked As Answer byFigo FeiMSFT, ModeratorFriday, July 04, 2008 1:36 AM
-
This post didn't really answer the question. Is the answer that you can't install into the GAC without gacutil on Windows Server 2008?
| | Figo Fei | I suspect the issue might be that youmight not have write permissions to the GAC folder, even if you are administrator. Phil Wilson | | PhilWilson | If, like me, you didn't want to install any extra tools or SDKS,I finally found a (non-obvious) way of doing this using the traditional drag and drop method:
- Open a Command Prompt as Administrator (right click, Run As Administrator).
- Run "explorer C:\windows\assembly".
- Open a new explorer windowfrom the windowwhich just opened(Right click -> Open whilst holding Ctrl). I did this by hopping back up to C:\windows and the navigating to my assembly in the second (new) window.
- Navigate in the first windows back to C:\windows\assembly.
- Drag and drop between the two windows.
Hope this helps someone.
Tim
- Proposed As Answer byTPaling Friday, January 16, 2009 2:41 PM
- Edited byTPaling Friday, January 16, 2009 2:26 PMAdd spacing.
-
Thanks Tim, your post helped me. I was looking for a way to deletea large number ofassemblies from the GAC using Windows Explorerand the only way I'd found was to turn off UAC, reboot, delete the assemblies, then turn UAC back on and reboot again, not exactly convenient.
What amazes me is that simply running Windows Explorer as Administrator doesn't work, even opening Explorer from the admin command window as you describe, but not specifying the path, then navigating to C:\Windows\assembly fromwithin Explorer doesn't work! Very non-intuitive! I hope this is better in Windows 7.
UPDATE: I discovered that itdoes workto create a shortcut to Windows Explorer which includes the path to the GAC (Target: %SystemRoot%\explorer.exe C:\Windows\assembly), which you can then invoke via Right-click, Run as Administrator. I put one on my desktop and labeled it "GAC" for quick access. - Edited bymatte303 Tuesday, January 20, 2009 8:01 PMupdate
-
Wednesday, January 21, 2009 2:57 AM Figo FeiMSFT, Moderator     To supplement my answer, to install assemblies into GAC we've got following ways:
- Using the Global Assembly Cache tool (Gacutil.exe).
Note: Gacutil.exe is only for development purposes and should not be used to install production assemblies into the global assembly cache.
- Using Microsoft Windows Installer 2.0.
This is the recommended and most common way to add assemblies to the global assembly cache. The installer provides reference counting of assemblies in the global assembly cache, plus other benefits.
- Using a Windows shell extension provided by the Windows Software Development Kit (SDK) called the Assembly Cache Viewer (Shfusion.dll).
The shell extension allows you to drag assemblies into the global assembly cache.
- Using the .NET Framework Configuration Tool (Mscorcfg.msc).
The .NET Framework Configuration Tool (Mscorcfg.msc) allows you to view the global assembly cache and add new assemblies to the cache.
The No.2 method is better fora deploymentof a real product. And you can do this in Visual Studio setup project:How to deploy an assembly to the target computer global assembly cache(also applies for VS2005 and VS2008)
Thanks.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
http://forums.msdn.microsoft.com/en-US/vssetup/thread/60424309-bd78-4ca2-b618-03c4a16123b6 - Proposed As Answer byFigo FeiMSFT, ModeratorWednesday, January 21, 2009 2:58 AM
-
I came here searchinghow to do this in Windows 7 rtm. TPaling's response did not work for me, I suspect it will also not work in 2008 R2 either (no testing just guessing). Of the four options in Figo's second response, installing the assembly using .Net Framework Configuration tool worked for me. | | TPaling | | Microsoft.... always making it easier... one of a hundred examples. | | Vidiot2008 |
|