Fake a Assembly

A

Armin

Hello

I have a DLL A which accessing an other DLL B.
In my Application I use DLL A.

DLL B has a Strongname.
DLL A not.

I have no access to the sourcecode of DLL A.
And no Access to the sourcecode of DLL B.

Now I want to replace the DLL B by my own new DLL C.
I create the exactly same Namespaces Classes and Properties.


But get en error that the manifest is wrong if I run the Application.

System.IO.FileLoadException: The Manifestdefinition of the Assembly don't
mach with the Assemblyreference.

=== Pre-bind state information ===
LOG: DisplayName = DeCon.Data, Version=7.2.0.2102, Culture=neutral,
PublicKeyToken=33b483f429c47342
(Fully-specified)
LOG: Appbase = D:\Nu\Bin\
LOG: Initial PrivatePath = NULL
Calling assembly : DeConX.Tools, Version=2.0.2.0, Culture=neutral,
PublicKeyToken=null.
===

LOG: Redirect found in application configuration file: 7.2.0.2102 redirected
to 20.1.1.1.
LOG: Safe mode is set (applyPublisherPolicy=no).
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Using codebase from policy file: file:///D:\Nu\Bin\DeCon.Data.dll
LOG: Post-policy reference: DeCon.Data, Version=20.1.1.1, Culture=neutral,
PublicKeyToken=33b483f429c47342

Then I created the Public Key out of the original DLL with the SN Tool

-e <assembly> <outfile>
Extract public key from <assembly> into <outfile>.


The use the *.snk in my own DLL.

But if I want to Compile the DLL I get an error that I have no Private
Key.......


Any Idea how to do this ?

Thanx
 
A

Armin

Okay, thanx

I found the answer

I Forget

<Assembly: AssemblyDelaySignAttribute(True)>

now it works :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top