Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - .snk File

Reply
 
Old 07-07-2008   #1 (permalink)
Scott M.


 
 

.snk File

After using the sn.exe tool (or using VS 2008) to generate a strong name key
file and associating my assembly with that strong name, what should I be
doing with the actual .snk file? Do I deploy that?

-Scott



My System SpecsSystem Spec
Old 07-08-2008   #2 (permalink)
Mr. Arnold


 
 

Re: .snk File


"Scott M." <s-mar@xxxxxx> wrote in message
news:%23zC$jUJ4IHA.4800@xxxxxx
Quote:

> After using the sn.exe tool (or using VS 2008) to generate a strong name
> key file and associating my assembly with that strong name, what should I
> be doing with the actual .snk file? Do I deploy that?

You have to deploy the file with the application, otherwise, the file is not
going to be there when the application looks for it.

My System SpecsSystem Spec
Old 07-08-2008   #3 (permalink)
Scott M.


 
 

Re: .snk File

Where on the production machine should the .snk file be deployed to?


"Mr. Arnold" <MR. Arnold@xxxxxx> wrote in message
news:ehy%23ayN4IHA.1420@xxxxxx
Quote:

>
> "Scott M." <s-mar@xxxxxx> wrote in message
> news:%23zC$jUJ4IHA.4800@xxxxxx
Quote:

>> After using the sn.exe tool (or using VS 2008) to generate a strong name
>> key file and associating my assembly with that strong name, what should I
>> be doing with the actual .snk file? Do I deploy that?
>
>
> You have to deploy the file with the application, otherwise, the file is
> not going to be there when the application looks for it.
>

My System SpecsSystem Spec
Old 07-09-2008   #4 (permalink)
Mr. Arnold


 
 

Re: .snk File


"Scott M." <s-mar@xxxxxx> wrote in message
news:OHlNS2T4IHA.3804@xxxxxx
Quote:

> Where on the production machine should the .snk file be deployed to?
I take that back. You don't have to deploy the .snk file.

I have only used the .snk file a couple of times, but that was during the
compile of a 3rd party business framework that used the .snk file during
compilation in the assembly manifest where the manifest pointed to the .snk
file, to make it a strong named assembly.

Once the assembly has been compiled using the .snk, then it's a strong named
assembly and you don't deploy the .snk file with the binaries.

Sorry for the miss information.


My System SpecsSystem Spec
Old 07-09-2008   #5 (permalink)
Mr. Arnold


 
 

Re: .snk File


"Scott M." <s-mar@xxxxxx> wrote in message
news:OHlNS2T4IHA.3804@xxxxxx
Quote:

> Where on the production machine should the .snk file be deployed to?
>
Oh, one other thing, if the assembly has to be strong named, it needed to be
deployed to a production machine and you didn't use the sn.exe tool for the
assembly, then you use the Gacutil.exe tool to place the binary in the
Global Assembly Cache of the machine. All assemblies place in the GAC are
tagged as a strong named assembly.

My System SpecsSystem Spec
Old 07-10-2008   #6 (permalink)
Scott M.


 
 

Re: .snk File

I don't think that's quite right. All assemblies in the GAC must be strong
named. This is how we avoid versioning conflicts.


"Mr. Arnold" <MR. Arnold@xxxxxx> wrote in message
news:eeNkEbj4IHA.2064@xxxxxx
Quote:

>
> "Scott M." <s-mar@xxxxxx> wrote in message
> news:OHlNS2T4IHA.3804@xxxxxx
Quote:

>> Where on the production machine should the .snk file be deployed to?
>>
>
> Oh, one other thing, if the assembly has to be strong named, it needed to
> be deployed to a production machine and you didn't use the sn.exe tool for
> the assembly, then you use the Gacutil.exe tool to place the binary in the
> Global Assembly Cache of the machine. All assemblies place in the GAC are
> tagged as a strong named assembly.

My System SpecsSystem Spec
Old 07-10-2008   #7 (permalink)
Mr. Arnold


 
 

Re: .snk File


"Scott M." <s-mar@xxxxxx> wrote in message
news:O$Wqi3s4IHA.2348@xxxxxx
Quote:

>I don't think that's quite right. All assemblies in the GAC must be strong
>named. This is how we avoid versioning conflicts.
>
You are correct on the strong named part, but I think the assembly
publictokenkey is what makes things unique where you can use an assembly
redirect in the web or app.config pointing to various version of the same
named assembly in the GAC. Maybe the sn.key is part of pt.key

My System SpecsSystem Spec
Old 07-11-2008   #8 (permalink)
Scott M.


 
 

Re: .snk File

The .snk contains a public/private key pair. For any assembly to be in the
GAC it must be stong named using this pair. If you redirect via your
..config files to another assembly in the GAC, that assembly will still have
to be strong named. If you point to a private assembly is doesn't (but
still could be).



"Mr. Arnold" <MR. Arnold@xxxxxx> wrote in message
news:uS3M6ku4IHA.2064@xxxxxx
Quote:

>
> "Scott M." <s-mar@xxxxxx> wrote in message
> news:O$Wqi3s4IHA.2348@xxxxxx
Quote:

>>I don't think that's quite right. All assemblies in the GAC must be
>>strong named. This is how we avoid versioning conflicts.
>>
>
> You are correct on the strong named part, but I think the assembly
> publictokenkey is what makes things unique where you can use an assembly
> redirect in the web or app.config pointing to various version of the same
> named assembly in the GAC. Maybe the sn.key is part of pt.key

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
open a file, wait for user to amend file, close & process PowerShell
multiselect file open dialog that supports long file names VB Script
Create New folder, move file, delete file. Explorer Freeze General Discussion
file icons dont match contents-file names hidden Vista file management
coping file from a remote file share - FILE IS NO LONG THERE bogus error message Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46