Presentation is loading. Please wait.

Presentation is loading. Please wait.

What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL.

Similar presentations


Presentation on theme: "What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL."— Presentation transcript:

1

2 What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL

3 Why we have to use GAC Adding again and again assembly in different project Shared location File security Side by side versioning (under consideration) Additional search location

4 How to install an assembly in GAC Install by using the gacutil.exe tool Recommended for developers Install by using GUI interface of Windows installer

5 How to make an assembly(.dll) Create a library project in Visual studio Add some functions To sign an assembly with a strong name public/private key pair Use this command to make a key sn -k.snk It creates a key pair file “keyname.sn”

6 How to make an assembly(.dll) cont… Put the key file in library project

7 How to install an assembly(.dll) Method -1 Open Visual Studio Command Prompt Use this command to register assembly gacutil.exe –i myassembly.dll It creates the folder with assembly C:\Windows\Microsoft.NET\assembly\GAC_MSIL

8 How to install an assembly(.dll) Method -2 Create a new setup project in same solution Drag the assembly to the GAC folder Build the setup project and install it It creates the folder with assembly C:\Windows\Microsoft.NET\assembly\GAC_MSIL

9 How to register an assembly(.dll) cont… Open registry and go to this path Create a registry key with assembly location For 32 bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NE TFramework\VersionMinimum\AssemblyFoldersEx\My Assemblies]@="AssemblyLocation“ [HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NET Framework\VersionMinimum\AssemblyFoldersEx\MyAs semblies]@="AssemblyLocation"

10 How to register an assembly(.dll) cont… For 64 bit operating system [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Nod e\Microsoft\.NETFramework\VersionMinimum\Assemb lyFoldersEx\MyAssemblies]@="AssemblyLocation" [HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\ Microsoft\.NETFramework\VersionMinimum\Assembly FoldersEx\MyAssemblies]@="AssemblyLocation“

11 Use assembly in Visual Studio Assembly is created under.NET column Just right “using assembly name;” and enjoy


Download ppt "What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL."

Similar presentations


Ads by Google