1 / 7

Global Assembly

Global Assembly. Publicly sharing functionality among different applications. Located in Global Assembly Cache. Identified by globally unique name ,culture, version and public key. Digital signature to ensure that it can’t be tampered with. Smaller exe files

amaris
Download Presentation

Global Assembly

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Global Assembly • Publicly sharing functionality among different applications. • Located in Global Assembly Cache. • Identified by globally unique name ,culture, version and public key. • Digital signature to ensure that it can’t be tampered with. • Smaller exe files • Dynamic linking i.e loading on demand

  2. Hashing

  3. Public/private keys

  4. Placing a strong name in assembly

  5. Checking strong name in assemb

  6. Creating a global assembly 1)create the key pair using strong name tool (sn) - c:\cs> sn –k myKeyPair.snk 2)Create a source file named ga.cs and add the following attributes at the beginning [assembly:AssemblyKeyFile(“myKeyPair.snk")] [assembly:AssemblyVersion("1.0.0.0")] 3) Create a module out of the source file (ga.cs  ga.dll) c:\cs> csc /t:module /out:bin\ga.dll ga.cs 4) Create a global assembly named myga.dll from ga.dll using al (assembly linker). c:\cs> al /t:library /out:bin\myga.dll bin\ga.dll [or] c:\cs>al /t:library /keyfile:app.snk /v:1.0.0.0 /out:bin\myga.dll bin\ga.dll If you didn’t add the attributes to the sourfile.

  7. Creating a global assembly 5) Load the global assembly (myga.dll) to GAC (Global Assembly Cache) using ‘gacutil’ C:\cs>gacutil –i bin\myga.dll - i switch installs the assembly into global assembly cache. 6) Check if ur assembly has been installed by using the following command c:\cs>gacutil –l myga

More Related