Questions tagged [gac]

The gac tag is for issues relating to the global assembly cache.

The Global Assembly Cache or GAC is a machine-wide .NET assemblies cache for Microsoft's CLR platform. The approach of having a specially controlled central repository addresses the shared library concept and helps to avoid pitfalls of other solutions that lead to drawbacks like DLL hell.

1043 questions
302
votes
3 answers

.NET 4.0 has a new GAC, why?

%windir%\Microsoft.NET\assembly\ is the new GAC. Does it mean now we have to manage two GACs, one for .NET 2.0-3.5 applications and the other for .NET 4.0 applications? The question is, why?
Max Toro
  • 27,264
  • 10
  • 71
  • 109
191
votes
8 answers

What is the GAC in .NET?

Just looking for a short overview of GAC for a layman, not a link please.
Nosrama
  • 13,592
  • 12
  • 46
  • 56
115
votes
5 answers

How to view the Folder and Files in GAC?

I want to view the folders and sub folders in GAC. Also want to know about adding and removing from GAC. To install we write this lines in command prompt by opening Visual Studio command prompt:- gacutil /i [assembly path] But to uninstall we need…
Rohit Vipin Mathews
  • 10,853
  • 15
  • 49
  • 100
92
votes
16 answers

The name 'ViewBag' does not exist in the current context

I am trying to use ViewBag in my application, I have all of the recent dlls, the latest version of MVC 3, but yet I am still getting the Error: "The name 'ViewBag' does not exist in the current context" I have even uninstalled and then…
efleming
  • 1,259
  • 2
  • 10
  • 10
83
votes
12 answers

How do I register a .NET DLL file in the GAC?

I have made a .NET .DLL file, which I want to register in the GAC. I have used this command in Windows Server 2003 Command Prompt: C:\"Path of dll"\>gacutil /i dllname.dll 'gacutil' is not recognized as an internal or external command, operable…
Vineet
  • 4,251
  • 10
  • 27
  • 34
73
votes
4 answers

Dll in both the bin and the gac, which one gets used?

We have a web application that's deployed to many websites with only frontend changes, the shared backend portion has it's DLL in the GAC so we only have to update that one dll and all the sites get the update. Is there a way to override the GAC…
John Boker
  • 78,333
  • 17
  • 93
  • 129
70
votes
6 answers

How can I force .NET to use a local copy of an assembly that's in the GAC

I have a .NET assembly that (for reasons outside my control) must be in the GAC. However, the same assembly is used by another program, which has a its own copy of an older version of the same assembly. It must use its own copy and not whatever is…
EMP
  • 51,372
  • 47
  • 157
  • 214
69
votes
3 answers

Gacutil.exe successfully adds assembly, but assembly not viewable in explorer. Why?

I'm running GacUtil.exe from within Visual Studio Command Prompt 2010 to register a dll (CatalogPromotion.dll) to the GAC. After running the utility, it says Assembly Successfully added to the cache, and running gacutil /l CatalogPromotionDll shows…
Ben McCormack
  • 29,788
  • 45
  • 138
  • 211
56
votes
3 answers

How can I list all registered assemblies in GAC?

How can I list all the assemblies that are in the GAC? Do I need a tool that makes it easy to view them?
pencilCake
  • 45,443
  • 73
  • 211
  • 346
56
votes
10 answers

Error message "Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC"

When one user tries to run the application, our ClickOnce application is reporting: Unable to install or run the application. The application requires stdole Version 7.0.3300.0 in the GAC. It's interesting to note that the GAC…
proudgeekdad
  • 3,354
  • 6
  • 39
  • 40
55
votes
10 answers

How can I reference a dll in the GAC from Visual Studio?

This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll How can I add a reference to this assembly in Visual Studio? I can view the file in c:\windows\assembly\
yankman
53
votes
7 answers

What are the advantages and disadvantages of using the GAC?

And on top of that, are there cases where one has to use the global assembly cache or where one cannot use it?
FantaMango77
  • 2,399
  • 4
  • 23
  • 27
46
votes
7 answers

When and when-not to install into the GAC?

When should you install into the GAC and when should you not? (I am referring, really, to installing on a client's machine when they have purchased our product(s)). I have an assembly that is only going to be used with my one application (GAC or…
Jason
  • 16,287
  • 23
  • 84
  • 136
46
votes
2 answers

Where is the .NET Framework Global Assembly Cache?

I installed the VS2010 and .NET 4.0, then I compiled an assembly and ran the gacutil using the exe available on %ProgramFiles%\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools The output of the executable said the assembly was sucessfully…
CARLOS LOTH
  • 4,353
  • 3
  • 35
  • 40
42
votes
4 answers

When should I deploy my assemblies into the GAC?

I would like to know practically what kind of Assemblies should I deploy in GAC. Case 1: If in my Solution multiple project uses log4net.dll then should it be deployed in GAC? Case 2: If I have multiple application deployed in a machine each using…
Amitabh
  • 51,891
  • 40
  • 102
  • 154
1
2 3
69 70