193:(for .NET 4.0) contain all globally available assemblies with managed filenames so that the version and public key tokens can be included. Each version can therefore exist within the same location and be called without requiring subsequent versions to preserve code entry point locations as usual. Windows Explorer allows the drag-and-drop installation of assemblies into this folder only if they would otherwise be permitted to be installed from the command line.
233:. The process of making an assembly "strongly named" can be quite painful in some situations. For example, if an assembly depends on another assembly that is not strongly named, it cannot be registered in the GAC. In cases where the code of the third-party assembly is not in the programmer's possession, transforming the assembly to be strongly named can in fact be impossible.
135:, displays the assemblies contained in the cache along with their versions, culture, public key token, and processor architecture. Assemblies are installed by dragging and dropping and uninstalled by selecting and pressing the
216:
used to compile it, which can cause the application to fail on machines with newer versions of the .NET Framework installed — even when the application would normally run properly with the newer version.
457:
371:
162:, but one is version 1.0 and the other is version 2.0. Since it is required that both be compiled to a file named AssemblyA, they cannot exist in the same directory within the
236:
Browsing for files using standard
Windows APIs doesn't allow selection of DLLs located under the "assembly" folder when Explorer is showing the user-friendly view of the GAC.
54:
residing in the GAC must adhere to a specific versioning scheme which allows for side-by-side execution of different code versions. Specifically, such assemblies must be
778:
426:
450:
768:
196:
A calling application may specify a version of an assembly when referencing it, so the run-time can simply refer to the filename to use the correct one.
773:
808:
443:
375:
316:
283:
66:
There are two ways to interact with the GAC: the Global
Assembly Cache Tool (gacutil.exe) and the Assembly Cache Viewer (shfusion.dll).
414:
402:
349:
181:
The GAC as a construct does not actually exist within the
Windows OS. It is implemented and managed by the CLI. The folders within
35:(CLI) in Microsoft's .NET Framework. The approach of having a specially controlled central repository addresses the flaws in the
813:
763:
727:
651:
641:
466:
32:
742:
687:
507:
490:
423:
672:
682:
803:
553:
512:
495:
223:
if some of the core .NET calls (used in the application) are only supported for some versions of the framework.
220:
586:
747:
626:
345:
312:
279:
163:
732:
591:
485:
304:
341:
308:
275:
271:
170:
502:
480:
146:
With the launch of the .NET Framework 4, the
Assembly Cache Viewer shell extension is obsolete.
226:.NET applications that rely on native code risk incompatibilities, even with the GAC mechanism.
173:
of the GAC can be used by programs that need to use each version of the assembly specifically.
646:
28:
120:
607:
430:
418:
406:
411:
399:
337:
717:
677:
581:
548:
543:
533:
528:
251:
246:
213:
155:
108:
Other options for this utility will be briefly described if you use the /? flag, i.e.:
78:
51:
36:
25:
797:
712:
140:
39:
concept and helps to avoid pitfalls of other solutions that led to drawbacks like
435:
84:
One can check the availability of a shared assembly in GAC by using the command:
166:
55:
702:
697:
656:
230:
136:
692:
707:
205:
40:
737:
722:
612:
90:
One can register a shared assembly in the GAC by using the command:
119:
The newer interface, the
Assembly Cache Viewer, is integrated into
372:"Ten Managed Application Pitfalls that Kill Version Compatibility"
576:
439:
212:
By default, applications will only run with the version of the
96:
Or by copying an assembly file into the following location:
204:
The Global
Assembly Cache mechanism helps to avoid older
338:"How to: View the Contents of the Global Assembly Cache"
756:
665:
634:
625:
600:
569:
562:
521:
473:
77:is an older command-line utility that shipped with
229:Every assembly that is added to the GAC must be
102:Note that for .NET 4.0 the GAC location is now:
81:1.1 and is still available with the .NET SDK.
451:
8:
208:, but it still has some drawbacks, such as:
424:Demystifying the .NET Global Assembly Cache
631:
566:
458:
444:
436:
272:"Global Assembly Cache Tool (Gacutil.exe)"
412:Global Assembly Cache Tool (gacutil.exe)
263:
305:"Assembly Cache Viewer (Shfusion.dll)"
7:
93:gacutil.exe /i <assemblyName>
87:gacutil.exe /l <assemblyName>
779:Visual Basic and Visual Basic .NET
14:
219:It is sometimes necessary to use
400:.NET Framework Developer's Guide
105:%windir%\Microsoft.NET\assembly\
374:. devsource.com. Archived from
352:from the original on 2013-07-19
319:from the original on 2013-07-30
286:from the original on 2013-07-17
133:%WINDIR%\Microsoft.NET\assembly
809:Common Language Infrastructure
467:Common Language Infrastructure
33:Common Language Infrastructure
1:
508:Platform Invocation Services
491:Common Intermediate Language
370:John, Mueller (2005-02-11).
830:
70:Global Assembly Cache Tool
769:C# and Visual Basic .NET
513:Virtual Execution System
774:Java and .NET platforms
221:conditional compilation
814:Windows administration
587:.NET Compact Framework
191:Microsoft.NET\assembly
539:Global Assembly Cache
346:Microsoft Corporation
313:Microsoft Corporation
280:Microsoft Corporation
115:Assembly Cache Viewer
18:Global Assembly Cache
592:.NET Micro Framework
486:Code Access Security
24:) is a machine-wide
342:Redmond, Washington
309:Redmond, Washington
276:Redmond, Washington
171:virtual file system
154:A computer has two
129:C:\WINDOWS\assembly
554:Standard Libraries
503:Common Type System
481:Application domain
429:2017-09-22 at the
417:2008-10-15 at the
405:2008-10-06 at the
125:%windir%\assembly\
99:%windir%\assembly\
791:
790:
787:
786:
621:
620:
821:
804:.NET terminology
632:
567:
460:
453:
446:
437:
387:
386:
384:
383:
367:
361:
360:
358:
357:
334:
328:
327:
325:
324:
301:
295:
294:
292:
291:
268:
134:
130:
126:
121:Windows Explorer
829:
828:
824:
823:
822:
820:
819:
818:
794:
793:
792:
783:
752:
661:
635:Major languages
617:
596:
563:Implementations
558:
517:
469:
464:
431:Wayback Machine
419:Wayback Machine
407:Wayback Machine
396:
391:
390:
381:
379:
369:
368:
364:
355:
353:
336:
335:
331:
322:
320:
303:
302:
298:
289:
287:
270:
269:
265:
260:
243:
202:
179:
169:. Instead, the
152:
132:
128:
124:
117:
112:
106:
100:
94:
88:
72:
64:
49:
12:
11:
5:
827:
825:
817:
816:
811:
806:
796:
795:
789:
788:
785:
784:
782:
781:
776:
771:
766:
760:
758:
754:
753:
751:
750:
745:
740:
735:
730:
725:
720:
715:
710:
705:
700:
695:
690:
685:
680:
675:
669:
667:
663:
662:
660:
659:
654:
649:
644:
638:
636:
629:
623:
622:
619:
618:
616:
615:
610:
604:
602:
598:
597:
595:
594:
589:
584:
582:.NET Framework
579:
573:
571:
564:
560:
559:
557:
556:
551:
546:
541:
536:
531:
525:
523:
519:
518:
516:
515:
510:
505:
500:
499:
498:
488:
483:
477:
475:
471:
470:
465:
463:
462:
455:
448:
440:
434:
433:
421:
409:
395:
394:External links
392:
389:
388:
362:
329:
296:
262:
261:
259:
256:
255:
254:
252:.NET Framework
249:
247:Download Cache
242:
239:
238:
237:
234:
231:strongly named
227:
224:
217:
214:.NET Framework
201:
198:
178:
177:Implementation
175:
156:CLI assemblies
151:
150:Example of use
148:
127:(for example,
116:
113:
111:gacutil.exe /?
110:
104:
98:
92:
86:
71:
68:
63:
60:
56:strongly named
48:
45:
37:shared library
13:
10:
9:
6:
4:
3:
2:
826:
815:
812:
810:
807:
805:
802:
801:
799:
780:
777:
775:
772:
770:
767:
765:
762:
761:
759:
755:
749:
746:
744:
741:
739:
736:
734:
731:
729:
726:
724:
721:
719:
716:
714:
711:
709:
706:
704:
701:
699:
696:
694:
691:
689:
686:
684:
681:
679:
676:
674:
671:
670:
668:
664:
658:
655:
653:
650:
648:
645:
643:
640:
639:
637:
633:
630:
628:
624:
614:
611:
609:
606:
605:
603:
599:
593:
590:
588:
585:
583:
580:
578:
575:
574:
572:
568:
565:
561:
555:
552:
550:
547:
545:
542:
540:
537:
535:
532:
530:
527:
526:
524:
520:
514:
511:
509:
506:
504:
501:
497:
494:
493:
492:
489:
487:
484:
482:
479:
478:
476:
472:
468:
461:
456:
454:
449:
447:
442:
441:
438:
432:
428:
425:
422:
420:
416:
413:
410:
408:
404:
401:
398:
397:
393:
378:on 2013-01-21
377:
373:
366:
363:
351:
347:
343:
339:
333:
330:
318:
314:
310:
306:
300:
297:
285:
281:
277:
273:
267:
264:
257:
253:
250:
248:
245:
244:
240:
235:
232:
228:
225:
222:
218:
215:
211:
210:
209:
207:
199:
197:
194:
192:
188:
184:
176:
174:
172:
168:
165:
161:
157:
149:
147:
144:
142:
139:or using the
138:
122:
114:
109:
103:
97:
91:
85:
82:
80:
76:
69:
67:
61:
59:
57:
53:
46:
44:
42:
38:
34:
30:
27:
23:
19:
713:JScript .NET
647:Visual Basic
538:
496:instructions
474:Architecture
380:. Retrieved
376:the original
365:
354:. Retrieved
332:
321:. Retrieved
299:
288:. Retrieved
266:
203:
195:
190:
186:
183:%systemroot%
182:
180:
159:
153:
145:
141:context menu
123:. Browsing
118:
107:
101:
95:
89:
83:
74:
73:
65:
50:
47:Requirements
26:CLI assembly
21:
17:
15:
764:C# and Java
748:Small Basic
167:file system
158:both named
75:gacutil.exe
798:Categories
757:Comparison
703:IronPython
698:IronScheme
657:PowerShell
522:Components
382:2008-01-26
356:2010-07-22
323:2010-05-27
290:2010-05-27
258:References
137:delete key
52:Assemblies
733:Phalanger
627:Languages
570:Microsoft
160:AssemblyA
708:IronRuby
549:Metadata
544:Manifest
534:Delegate
529:Assembly
427:Archived
415:Archived
403:Archived
350:Archived
317:Archived
284:Archived
241:See also
206:DLL hell
200:Pitfalls
187:assembly
41:DLL hell
31:for the
728:Oxygene
723:Nemerle
693:C++/CLI
613:DotGNU
185:named
743:Scala
688:Cobra
666:Other
601:Other
164:FAT32
131:) or
62:Usage
29:cache
673:Axum
608:Mono
577:.NET
189:and
79:.NET
16:The
683:Boo
22:GAC
800::
738:Q#
718:J#
678:A#
652:F#
642:C#
348:.
344::
340:.
315:.
311::
307:.
282:.
278::
274:.
143:.
58:.
43:.
459:e
452:t
445:v
385:.
359:.
326:.
293:.
20:(
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.