Home
  U.S.A. Links
  UK Links
  Canada Links
  Software Links
  U.S.A. Links
  Churches
  Restaurants
  Grocery Stores
  Hindu Temples
  Garment Stores
  Jewellery Stores
  Travel Agents
  UK Links
  Restaurants
  Grocery Stores
  Churches
  Canada Links
  Churches
  Restaurants
  Grocery Stores
  Hindu Temples
  Jewellery Stores
  Garment stores
  Software Links
  Blogs
  Interview Center
  Tips and Tricks
  My Account
  Log In
  New Account
  Change Password
  Personal Profile
  About Us
  Site Map
  Contact Us
  Feed Back
  Add to Listing
 We recommendAustraliaIndian.comCCExoticstones.comAlvarezPigeons.comAttractionsToGo.com
 
11:00 PM EST                  The ultimate source for Indian Resources.                       Sign In!      
 
 
      Skip Navigation LinksCourtesyIndia.com >> Software >> Blog's >> Add an assembly to GAC
How to add an assembly to Global Assembly Cache.
This article is based on .Net 2.0 / ASP.Net 2.0

For adding assemblies to GAC have the follow the steps( assume the working directry is C:\Test\WebTest\)


  • Create a Strong name
    Open dos promt and got to your working folder. Type sn -k "MyKey.snk" command in dos promt
    ( Sn.exe can be located in folder "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin". Eighter you can copy this file into working folder or set enviornment path to this folder). "MyKey.snk" will be created in your working folder. check for file MyKey.snk in yor working folder



  • Create a C# file MyTest.cs



  • Create Assemblyinfo file add an entry for AssemblyKeyFile.


    Compile using the command from dos prompt.(Check envirmnment path for "csc.Exe". This file is located in the folder "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727") csc /t:library /r:c:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll,c:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /out:C:\Test\WebTest\MyTest.dll C:\Test\WebTest\MyTest.cs C:\Test\WebTest\AssemblyInfo.cs

    Check for MyTest.dll in your working folder



  • Place the assembly into GSA directory.
    Use the tool GACUtil.exe to place the assembly in GAC
    Check for envirmnment path for "gacutil.exe".) Run Command gacutil /i MyTest.dll from dos prompt.)



  • Add an entry in web.configin assembly section.
    Go to folder windows/assembly locate your assembly and right click. Open properties and find the required informations to add in the web.config file.
    Open Web.Config and add in System.web section



    Now the name space CIC ia available for this application
  • Shiju Kadamala
    smathews@courtesyindia.com
    Happy Programming!.

    CourtesyIndia.com
     Home | Visitor Agreements  | Privacy PolicyFAQ