Monday, June 17, 2013

Public Assembly

As the name suggests a Public Assembly or Shared Assembly is one which is shared with various applications in the same system, hence these assembly files cannot be placed in the individual application folders, and these assembly files are placed in a common location in the machine called the Global Assembly Cache.

Public Assembly or Shared Assembly should have specific version information. All public / shared assemblies are placed in a common folder in the machine called the Global Assembly Cache. The GAC is usually located in the path C:\Windows\Assembly

For an assembly to be made public / shared, it should be signed with a strong name key. A public / shared assembly can be uniquely identified using its version number.

String names for assemblies can be created using a built in .Net tool called “sn”

sn –k C:\mysample.key

Public / Shared assemblies can be deployed into the GAC either by manually copying / dragging them into the GAC folder of by using the built in .Net utility “gacutil”

gacutil /i myassembly.dll

Search Flipkart Products:
Flipkart.com

No comments: