Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / September 2003

Tip: Looking for answers? Try searching our database.

Installing sn.exe seperately

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tal Kedem - 16 Sep 2003 14:04 GMT
Hi.

My company installs some application on a client machine.
Among other thing, the application should generate J# code, and build a
strong-named dll from the generated code.
I've noticed that sn.exe is a part of the .Net Framework SDK(~108MB).
al.exe, for example is a part of the .Net Framework Redistributable(~23MB).

1. Why is there a difference in the location of certain .Net tools?
What's more odd is that al.exe has a feature of signing an assembly, so why
not supply sn.exe along with the .Net Framework Redistributable?

2. Can I (legally...) install just sn.exe on the client machine instead of
asking him to install a 108MB package that he doesn't necessarily need?

10x
mikeb - 17 Sep 2003 01:48 GMT
> Hi.
>
[quoted text clipped - 12 lines]
>
> 10x

I don't know the answers to your specific questions, but you can use the
al.exe program to do what you want - though you'll end up with a
multi-file assembly instead of a single-file dll assembly.  Just have
your generated J# code compiled to a netmodule, then use al.exe to
create the signed dll.

The dll and netmodule files make up the assembly.  As far as the
framework is concerned, that's just as valid an assembly as one that's
contained in a single dll file.

mikeb
Tal Kedem - 17 Sep 2003 10:11 GMT
thanks for the answer.

My problem is that I DON'T HAVE the .snk file I want to sign with.

I want to produce one on the fly and then use it to sign the assembly.
As far as I can see - al.exe doesn't produce .snk files but only uses
existing ones.
The same goes for compiling and signing directly from vjc.exe with
AssemblyKeyFile Attribute.
Either way - you need a previously generated .snk file, and only for that
util alone you are requested to install the .Net Framework SDK which is
108MB in size.

> > Hi.
> >
[quoted text clipped - 24 lines]
>
> mikeb
mikeb - 17 Sep 2003 23:16 GMT
> thanks for the answer.
>
[quoted text clipped - 8 lines]
> util alone you are requested to install the .Net Framework SDK which is
> 108MB in size.

OK, I understand a bit better now.  You can try creating a key pair
using Win32 interop with the CryptoAPI.  Look at the functions
CryptDeriveKey and CryptGenKey.  Using these you should be able to
create a key pair that is stored in a CSP key container.

You can specify the key container to use in your generated source code
using the AssemblyKeyNameAttribute class.  Alternatively, you can invoke
al.exe using the /keyname option.

>>>Hi.
>>>
[quoted text clipped - 32 lines]
>>
>>mikeb

--
mikeb

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.