Solved

How do I create a strong name key file?

Posted on 2008-10-16
6
755 Views
Last Modified: 2013-11-05
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
Comment
Question by:sbornstein2
  • 4
  • 2
6 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22730598
Step 4: Create a Strong Name Key File
http://msdn.microsoft.com/en-us/library/aa559684.aspx
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 22730599
SN.EXE - Code Strong Programs with Strong Names
http://visualbasic.about.com/od/usingvbnet/a/FWTools5.htm
0
 

Author Comment

by:sbornstein2
ID: 22730935
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:sbornstein2
ID: 22731086
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
 

Author Comment

by:sbornstein2
ID: 22731180
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
 

Author Closing Comment

by:sbornstein2
ID: 31506704
thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now