Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating strong names in .NET using Strong Name Tool

After getting the instruction from google, I've tried to create StrongNameFile with the following command:

C:\Program Files\Microsoft Visual Studio 9.0\VC\sn -k StrongNameFile.snk

When I ran the command, I got an error message:

'sn' is not recognized as an internal or external command, operable program or batch file.

I tried it in the following way:

C:\Program Files\Microsoft Visual Studio 9.0\SDK\v3.5\Bin>sn -k StrongNameFile.snk

But got the same error. Please somebody help me to solve this problem.

like image 908
Kumar Avatar asked Jan 18 '10 04:01

Kumar


1 Answers

Open a Visual Studio Command Prompt instead of a normal command prompt. (Start > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio Command Prompt.) This will set up your PATH to include the .NET Framework SDK directories, which include sn.exe.

If you need to set up the path manually for your own scripts or command prompts, the path you need is:

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

(Exact version number may vary.)

like image 194
itowlson Avatar answered Sep 28 '22 01:09

itowlson