tags:

views:

38

answers:

2

Hey

I have a program that references a strongly named assembly which is in the gac. I have a debug build of this assembly which I want to debug into, but it isn't strongly named. Can I use a policy file or something to force the program to use the weakly named assembly? Or do I have to recompile the program to reference the weakly named assembly? (These assembles are purchased from a 3rd-party. I have the source to them but I don't have the company's private key to strongly name my own build of them with the same key.)

Thanks, Phil

+1  A: 

You should add the assemblies to the Verification skip list by running sn -Vr in the Visual Studio Command Prompt.

This will tell the runtime not to verify the assemblies' signatures.
For security reasons, you should remove them when you finish.

SLaks
No, it isn't being verified anyway in full trust. The issue is to not let the CLR find the assembly, the GAC is always searched first.
Hans Passant
+1  A: 

Just changing the [AssemblyVersion] of the debug version would be the quick fix. Running gacutil.exe to temporarily remove the assembly from the GAC would be another.

Hans Passant