Install an Assembly in GAC (Global Assembly Cache)
Section 1: Create a strong name for assembly:
<1> Go to command prompt;
<2> Type C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\;
<3> Type sn -k "C:\[PathInVSProject]\Projectname.snk"
<4> Add <Assembly: AssemblyKeyFile
("..\..\Projectname.snk")> to AssemblyInfo.vb in VS
project;
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
<Assembly: AssemblyKeyFile("..\..\projectname.snk")>
<5> Rebuild VS project(it will generate a new strong
named dll);
Section 2: Install assembly to GAC:
<1> Go back to command prompt(make sure that location
still points to C:\Program Files\Microsoft Visual
Studio .NET 2003\SDK\v1.1\Bin\;
<2> Type gacutil -I "C:\[PathToBinDirectoryInVSProject]
\projectname.dll"(if project is in release mode)
gacutil -I "C:\[PathToObj\DebugDirectoryInVSProject]
\projectname.dll"(if project is in debug mode)
Section 3: Register assembly entry in registry:
<1> Click Start - run, then type regedit to open registry;
<2> Go to
HEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Assembly
Folders\;
<3> Right click AssemblyFolders, then select new to
create a new key for your assembly(for example:
Security);
<4> Select Modify by right clicking Default, then enter
the location where your dll resides.
Now, you should be able to see the name of your dll from
the reference list when you open a VS project.
Good luck !
-----Original Message-----
(Type your message here)
strong name key and then executing a command at .NET
prompt gacutil.exe -i assemblyname.dll, but when i need to
add this assembly in another application, i dont find this
assembly in the add reference dialog......so plz could u
help me how to add it in add reference dialog?