Pages

Wednesday, April 3, 2013

How can we create Assembly in GAC?

There are 3 methods
1stmethod:By using command GAC UTIL -I
By using this command in visual studio command prompt

2ndmethod:Whatever we are created, we can drag to the GAC

3rdmethod:
Strong Name Concept:

Strong Name is a public key token of the assembly, which is different(Unique) for each Assembly

By using SNK properties one option is there sign of assembly(When we deploy automatically strong will create)

without strong name we cannot create assembly in GAC.

Benifit of StrongName :

we are creating an Identifier for Assembly that is Unique for each Assembly.

For ex: two assemblies are there Assembly A, Assembly A having same name

While calling conflict will come , application will get confuse which Assembly can be called , When the  Assemblies having same name and same version that time application will get confuse, which one has to use ,this is called dll hell problem.

Name Space: We can give logical group name to types(Classes, Interfaces)

System.dll Assembly
(NameSpace)

It consists of objects,classes,public access specifiers, string class...etc

NameSpace A ,NameSpace B

both namespaces have class x in each one separately , when we use A.x then there might not be any Naming Convention.

0 comments:

Post a Comment