|
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
|