Question

I have created one simple Class Library project. I have equipped this Class Library project with delay signed assembly.

Now, I have created Unit Test project to test one class in the above Class Library project.

Since, I have used delay signed assembly for my Class Library project, it should not be debuggable, right! But, it is debugging successfully.

Where is the problem with my understanding?

No correct solution

OTHER TIPS

Delay-signing was specifically intended to support the exact scenario you describe. The basic idea is that a developer is not trusted enough to have access to the private key. Which is kept in a vault, accessible only to a few select people that have the responsibility to permanently sign the assembly. This limits the number of ways that a private key can be revealed and used by somebody else to exploit a man-in-the-middle attack. Private key protection is essential. A company like Microsoft worries about this kind of thing.

So to give the developer a fighting chance to debug and test his code, he needs a way to make it look like the assembly has a strong name. Delay signing uses a temporary private key and puts data in his registry that records that this temporary key is a substitute for the real one. The CLR looks for this registry key when it checks the strong name, giving the okay when it finds it.

So everything works like it normally does. As long as it is done on the specific machine that delay-signed the assembly. If you'd move the assembly to another machine and try to test it then it will no longer work since the registry entry is missing. Assuming that strong name verification is turned on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top