views:

330

answers:

1

Problem

The basic problem is I want to debug some 3rd party code to see how it works so I can replace part of it.

Is there anyway to redirect the binding so that it will not use the dll in the GAC but instead the copy I compiled instead (which will be either unsigned or have a different public key).


Details

The specific item in question is asp.net mvc, the reason is the copy of the dll in the gac has been optimised and does not match up correctly with the source code in Microsoft's source server.

Microsoft have released the source for asp.net mvc so I can download it and compile the dll myself, but obviously I cannot sign the dll with their key, I can sign it with my own key but then it will have a different public key token.

The simple answer would be to reference my dll in my application and re-compile my application, but then I also have to recompile every other 3rd party dll that references asp.net mvc (eg, mvccontrib).

A: 

You can tune signing verification with the SN.EXE tool.

sn -Vr assembly

Unregister the original assembly from the GAC then put your own in the program's folder and use SN to skip verification.

Guillaume
Is there a way to avoid removing it from the GAC, as it is referenced by an msi installer so gacutil is refusing to remove it and I generally like to avoid brute force and breaking random things later.
KeeperOfTheSoul