Solved

Create a strong name for an Assembly for without original source code?

Posted on 2004-08-16
4
1,349 Views
Last Modified: 2012-05-05
I've inherited a component that has a reference to a .NET assembly that does not have a strong name. I do not have the source code for the referenced assembly but wish to make it strongly named. The reason for this is that I keep getting the following error when calling this component which contains a reference to an assembly which is not strongly named:

TestHarness.exe is an executable that contains a reference to a strongly named dot net assembly called Foo.dll
Foo.dll contains a reference to a .NET assembly 'Bar' which is not strongly named.

An unhandled exception of type 'System.IO.FileLoadException' occurred in TestHarness.exe

Additional information: The located assembly 'Bar' is not strongly named.

Is it possible to generate a strong name for a .NET component without having the source-code? I've seen some command line tools and tried sn.exe etc but none seem to be able to do this.

I thought a workaround would be to make the referenced assembly strongly named but I do not have the source code.

Or is there another way around this problem using code?

500 points on offer for a solution to put me out of my misery!

Jon
0
Comment
Question by:jgianni
4 Comments
 
LVL 4

Expert Comment

by:Jigit
ID: 11808883
jgianni, in order to compile your assembly with strong name you do not need sources of other assemblies. Only their *.snk file is needed for this purpose. The file contains information about the cryptograffic key. Use the below link for more information:
http://www.dotnetspider.com/Technology/KBPages/406.aspx

HTH,
Jigit
0
 

Author Comment

by:jgianni
ID: 11808922
sorted it myself now - original components were Java class files and resolved by using Jbimp with keyfile switch.

Thanks for the help anyway.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12117148
PAQed, with points refunded (500)

Computer101
E-E Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

820 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