snk file & rss.net

K

kronrn

Hi Folks

thanks for taking the time to read this post.

I'm using the RSS.Net class library which can be found at

http://rss-net.sourceforge.net/

It works fine but when I come to build a release version I'm informed
that the snk file cannot be found. It doesn't appear to exist so that's
not unexpected.

A file in the project, AssemblyInfo.cs, contains the lines

#if !DEBUG
[assembly: AssemblyKeyFile("..\\..\\rss.snk")]

I haven't worked with snk files before and wondered if anyone can give
me a hint on how best to address this. Removing the above lines allows
a release build to be built successfully.

Is the snk file something I should create myself, using the appropriate
tools to create public/private keys and so on?

Apologies if this question is a bit vague, I've only just started
reading about snk files so my knowledge is limited at present.

TIA

Kron
 
D

Dan Normington

I think the only reason for using the SNK file is to allow your assembly to
be added to the GAC. If you don't plan on adding it to the GAC then you
could probably just remove the code. I tend to give all my framework
libraries strong names by using the SNK file, but it is just a preference.
If you want to you can just generate a SNK file for your project like so:

sn -k NameOfFile.snk
 
A

Andreas Mueller

Dan said:
I think the only reason for using the SNK file is to allow your assembly to
be added to the GAC.

The main thing is that it does sign your assembly to prevent tampering.
http://tinyurl.com/hscfb

If you don't plan on adding it to the GAC then you
could probably just remove the code.

You should check the licence of the library. If you are allowed to
modify the code and rebuild it, this is an option. However, I would
recommend to get a binary build or the snk file of the library and use
that instead to prevent possible version conflicts. (E.g. a different
incompatible version of the library in the GAC on a target machine)

HTH,
Andy
 
D

Dan Normington

Andreas,
Good point on the tampering. I checked out the site and it appears to be
open source so he should be able to change the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top