Posts

Showing posts from January, 2008

Placing a .NET assembly in the GAC using MMC and sn.exe

Image
Step 1: Locate the assembly Locate the correct version of assembly with the mode you want to work with. (Debug, Release) Step 2: Open Visual Studio Command Prompt (Available in Visual Studio.NET Program group > Visual Studio.NET Tools >) • See the screenshot below • Switch to the directory location of assembly that you want to place in GAC. • Verify whether the assembly is strongly named or not, by typing the following command: sn –v myassembly.dll (-v switch verifies whether that assembly represents a strongly named assembly or not.) • If it represents a strongly named assembly, skip to step 4. Step 3: So you have an assembly that needs to be strongly named? • Create a key pair file that can be assigned to an assembly. To create a new key pair file Use sn –k keyfile.snk. Place this key file (keyfile.snk) in to the root of t...