Can the new PublicSign C# compiler option be used instead of DelaySign? Will it like DelaySign
allow later to real sign/Authenticode-sign the assembly?
Are there scenarios where you must revert to DelaySign
and can't use PublicSign
? I found one scenario is when your project has a <COMReference>
, the ResolveComReference
task fails because DelaySign
is false, but the .snk
file doesn't have the private key: https://github.com/Microsoft/msbuild/issues/4317
I just tried this.
sn -R
will real-sign a public-signed assembly so long as you use the private key for the same public key it was public-signed with. If you use a different private key, it will refuse.