473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Strong naming 3rd party assemblies / IL modifications.

Recently I had to do some really nasty work (I consider any IL work
nasty) to get a set of (not strong named) 3rd party assemblies to
compile with our solution (which is strong named).

We've notified the 3rd party and a strong named version will be
provided in the next release, but in the mean time for our internal
development and testing to continue we've had to do some hacking.
I do not recommend this technique with regards to production systems.
Get your provider to strong name their assemblies or choose another

The basic idea is something that has floated around on the newgroups
from time to time. The ildasm/ilasm trick. Essentially disassembling
the original assembly to IL, and then assemble it back to assembly with
a strong name key (in this case, our own one).

There is a further trick that I wanted to mention.

The scenario is as follows:

If the 3rd party assemblies are:

Assembly A,
Assembly B.

A references B

And in our solution we use both

Assembly A, B.

The IL generated in the original Assembly A will show something like
this in relation to the reference to B:

..assembly extern B
.ver 1:0:0:0

You need to modify the IL and insert your own public key here before
re-assembling "A" again.

..assembly extern B
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
// .z\V.4..
.ver 1:0:0:0

(this example key is the mscorlib key - use your own public key that
you used to sign B)

This 'fix' is necessary because if we don't modify the reference here,
when we re-assemble "A", the reference information won't be updated,
then when we build our solution which references both A and B, it would
be fine with B, but with A it will error saying:

Assembly generation failed -- Referenced assembly 'B' does not have a
strong name

I saw a few posts here and there that related to this problem, but had
no solutions. Hope this helps someone (eventually/somewhere).


May 24 '06 #1
0 1106

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ted | last post by:
What are the negatives to strongly naming assemblies? Why wouldn't we want to strongly name all assemblies that we ship as part of our products? Thanks Ted
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none...
by: Jason | last post by:
I've been experiementing with Assembly.Load..CreateInstance and strong naming the assemblies. This has given me a few questions, 1. Does the version number matter? I've found that its the...
by: Jimski | last post by:
Hi all, I am creating an assembly that will access a database to return record details. I need to deploy it to a 3rd Party and they will then be able to use the assembly in their code to...
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc)....
by: Mark Keogh | last post by:
Hi, Why is everything some confusng when MS are involved ;-) Anyway, I have my excel export routines working fine, now when I try to build them into my assembly, which has a strong name, I get...
by: Bruce Wood | last post by:
I still haven't gotten through the .NET Framework Security tome on my desk. Maybe the folks here can answer a burning question. I want to use strong naming at our organization as a security...
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.