Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IO.FileSystemWatcher dies when used in Powershell 1 45
Memory Usage 2 50
In WPF / C# binding a local database in code behind 1 24
how to read json value 2 32
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now