473,322 Members | 1,522 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,322 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).

DISCLAIMER:
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
provider.

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).

jliu
johnliu.net

May 24 '06 #1
0 1103

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

Similar topics

8
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
10
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...
1
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...
1
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...
8
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)....
3
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...
7
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...
1
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. ...
6
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.