Solved

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

Posted on 2004-08-16
4
1,348 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

773 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