Powered by Blogger.

Saturday, March 8, 2014

assembly in C#.net




In this article we will discuss about assemblies in C#.Net.

Also you can check out:

- Steps to create wcf service and host wcf service as windows service in C#.Net

- RegularExpressionValidator example in Asp.Net

- Implement delete functionality in Gridview in Asp.Net

- Assemblies are the physical files that contain compiled code. The extension is .exe if they are stand-alone application and .dll if they are resuable components.

- All .NET classes are contained in assemblies.

- This is a solution to DLL Hell problem. DLL Hell  problem occurs because multiple versions of the COM component are not allowed to installed.

- .Net framework installed all the assemblies to C:\Windows\Assembly directory.

- An assembly can contain multiple namespaces.Namespaces are a logical way to group classes. Assemblies are a physical package for distributing code.

- Some microsoft assemblies are mscorlib.dll, System.Web.dll

- An assembly can be shared between applications by placing it in the Global Assembly Cache. Assemblies must be strong-named before they can be placed in the Global Assembly Cache.

There are 3 types of assembly in C#.Net
- Private assembly:
A private assembly normally used by a single application and is stored in applications directory.

- Shared assembly:
A shared assembly is normally stored in global assembly cache and can be used by multiple applications.

- Satellite assembly:
Satellites' assemblies are employed in a multi languages context such an application dedicated to a wide number of people issued from different cultures.

- You can use Gacutil commandline utility to install or uninstall assembly to GAC.

To install:
Gacutil   -i assemblyName

To UnInstall:
Gacutil   -u assemblyName



0 comments

Post a Comment