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.

1053 questions
304
votes
4 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
  • 28,282
  • 11
  • 76
  • 114
197
votes
9 answers

What is the GAC in .NET?

Just looking for a short overview of GAC for a layman, not a link please.
Nosrama
  • 14,530
  • 13
  • 49
  • 58
119
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
  • 11,629
  • 15
  • 57
  • 112
93
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,269
  • 2
  • 10
  • 10
90
votes
13 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
  • 5,029
  • 10
  • 29
  • 34
76
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
  • 82,559
  • 17
  • 97
  • 130
76
votes
7 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
  • 59,148
  • 53
  • 164
  • 220
70
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
  • 32,086
  • 48
  • 148
  • 223
61
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
  • 51,323
  • 85
  • 226
  • 363
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,424
  • 6
  • 42
  • 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
55
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,407
  • 4
  • 24
  • 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,739
  • 23
  • 87
  • 137
46
votes
2 answers

Is there any GAC equivalent for .NET Core?

As I currently understand in the full .NET Framework when we install the framework to the machine it deploys the whole BCL to the computer's GAC. In that way when we develop a software with .NET and deploy to that computer it'll use the BCL…
user1620696
  • 10,825
  • 13
  • 60
  • 81
46
votes
3 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,675
  • 3
  • 38
  • 44
1
2 3
70 71