• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 766
  • Last Modified:

How do I create a strong name key file?

Hello all.  I am utilizing in one of my applications a DLL.  In the setup instructions it is saying if I need to consume the components I must specify a value for the AssemblyKeyFile attribute in the AssemblyInfo file indicating the path to the file containing the key pair used to generate the strong name such as a KeyPair.dat file.  It has been a long time since I had to create a AssemblyKeyFile.  How do I do that?  I know there is a sn.exe in the SDK for VS 2005 but I am not sure what the key pair is and how to create it.  Thanks for any help.
0
sbornstein2
Asked:
sbornstein2
  • 4
  • 2
1 Solution
 
DhaestCommented:
Step 4: Create a Strong Name Key File
http://msdn.microsoft.com/en-us/library/aa559684.aspx
0
 
DhaestCommented:
SN.EXE - Code Strong Programs with Strong Names
http://visualbasic.about.com/od/usingvbnet/a/FWTools5.htm
0
 
sbornstein2Author Commented:
Hi Dhaest, thanks for your help.  So I did the first link and went into the Visual Studio 2005 Command Prompt.  I went to the directory where I wanted to create the key and typed in sn -k keypair.dat and it said Access Denied.  Also just so I understand when the documentation I am reading says if I want to use the Core Security components for declarative security and I plan to consume them I must specify a value for the AssemblyKeyFile, do I have to like point to a DLL or something or is this just creating the strong name key and then I reference it in the AssemblyInfo file if that makes sense?  Do I have to register this in the GAC etc?  Thanks for all your help
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
sbornstein2Author Commented:
I do see a keypair.dat file in a directory so I am wondering if I need to create a strong name for that or something.
0
 
sbornstein2Author Commented:
ok so I see there is this dat file key.  I assume I have to place that in the directory and then create a AssemblyInfo.cs and then just add the AssemblyKeyFile line, does that sound correct?
0
 
sbornstein2Author Commented:
thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now