.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
Subhransu Sekhar Jena
abhays
SP
DotnetUser

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Can you have two assemblies with the same name in GAC?

Posted By :Amit Mehra     Posted Date :August 06, 2008    Points :10   Category :.NET Framework 
Yes you can have two or more assemblies having same name in GAC only when assemblies version no is different.As we know that all assemblies in .NET is having version no.

You can also find related Interview Question to Can you have two assemblies with the same name in GAC?  below: 

What is Satellite Assemblies in .NET?

  
Assemblies which contains culture information are known as satellite assemblies. Satellite assembly is used to get language specific resources for an application. (More...)

Where are shared assemblies stored in .NET?

  
Shared Assemblies are stored in Global Assembly Cache also known as GAC. (More...)

What are private assemblies and shared assemblies?

  
A private assembly is used only by a single application, and is stored in that application's install directory (or a subdirectory therein). A shared assembly is one that can be referenced by more than one application. In order to share an assembly, the assembly must be explicitly built for this purpose by giving it a cryptographically strong name (referred to as a shared name). By contrast, a private assembly name need only be unique within the application that uses it.
By making a distinction between private and shared assemblies, we introduce the notion of sharing as an explicit decision. Simply by deploying private assemblies to an application directory, you can guarantee that that application will run only with the bits it was built and deployed with. References to private assemblies will only be resolved locally to the private application directory.
There are several reasons you may elect to build and use shared assemblies, such as the ability to express version policy. The fact that shared assemblies have a cryptographically strong name means that only the author of the assembly has the key to produce a new version of that assembly. Thus, if you make a policy statement that says you want to accept a new version of an assembly, you can have some confidence that version updates will be controlled and verified by the author. Otherwise, you don't have to accept them.
For locally installed applications, a shared assembly is typically explicitly installed into the global assembly cache (a local cache of assemblies maintained by the .NET Framework). Key to the version management features of the .NET Framework is that downloaded code does not affect the execution of locally installed applications. Downloaded code is put in a special download cache and is not globally available on the machine even if some of the downloaded components are built as shared assemblies.
The classes that ship with the .NET Framework are all built as shared assemblies. (More...)

How can I see what assemblies are installed in the global assembly cache?

  
The .NET Framework ships with a Windows shell extension for viewing the assembly cache. Navigating to % windir%\assembly with the Windows Explorer activates the viewer. (More...)

Is versioning applicable to private assemblies?

  
Versioning concept is only applicable to global assembly cache (GAC) as private assembly lie in their individual folders. (More...)

What are the Types of Assemblies?

  
One of the disadvantages of using Visual Studio.NET and the .NET framework to develop applications has been the lack of cross-platform support. Since the introduction of the .NET framework and common language run time a few years ago, there have been a few projects designed to bring the .NET framework to other platforms, including Linux and UNIX. The DotGNU project is touted as the "Free software alternative to .NET" and encompasses a number of projects, including DotGNU Portable .NET, which is designed to be used to compile and run C# and C applications on a multitude of platforms, including GNU/Linux, FreeBSD, Mac OS X, and Windows. One of the main features of the product is it's compatibility with EMCA standards for C# and the Common Language Infrastructure (CLI), as well as Microsoft's own CLI implementation in the .NET framework. The project chose to go with a "Virtual Machine" implementation, where bytecode is transformed into a simple instruction set which is then passed to a "Converted Virtual Machine", which then are executed through an interpreter. This approach is different to other open source .NET implementations, but provides more flexibility when porting the project to other platforms. At the core of the project is the runtime engine (ilrun) and compiler (cscc) with an implementation of System.Windows.Forms that make
developing for the platform easier, as it doesn't required translation through another toolkit or toolset. (More...)

What are the core WPF assemblies?

  
The core WPF assemblies are,

WindowsBase.dll:- It defines the core types constituting the infrastructure of WPF API.

PresentationCore.dll:- Defines numerous types constituting foundation of WPF GUI layer.

PresentationFoundation.dll:- It defines WPF control types, animation & multimedia support, data binding suport and other WPF services.

Besides these three libraries WPF also uses an unmanaged binary called milcore.dll which acts as a bridge between WPF assemblies and DirectX runtime layer. (More...)

What are the Different Types of Assemblies?

  
1) Private Assembly
2) Shared Assembly
3) Satellite Assembly


(More...)

What is Public or shared assemblies ?

  
These are static assemblies that must have a unique shared name and can be used by any application.
An application uses a private assembly by referring to the assembly using a static path or through an XML-based application configuration file. While the CLR doesn't enforce versioning policies-checking whether the correct version is used-for private assemblies, it ensures that an
application uses the correct shared assemblies with which the application was built. Thus, an application uses a specific shared assembly by referring to the specific shared assembly, and the CLR ensures that the correct version is loaded at runtime.
(More...)

How do assemblies find each other?

  
By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private assemblies the search path is normally the application's directory and its sub-directories. For shared assemblies, the search path is normally same as the private assembly path plus the shared assembly cache. (More...)

Is versioning applicable to private assemblies?

  
Versioning concept is only applicable to global assembly cache (GAC) as private assembly lie in
their individual folders. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend