jbevain / cecil

Cecil is a library to inspect, modify and create .NET programs and libraries.
MIT License
2.77k stars 630 forks source link

add strong naming support for netstandard #803

Open SimonCropp opened 3 years ago

SimonCropp commented 3 years ago

@jbevain can this get some love. happy to pay you to look into it

jbevain commented 3 years ago

@SimonCropp thank you as always for the PR. I'm in a bit of an intense period at work and have been lagging behind a bit on the last few new Issues and PRs. I'll get to them asap.

atlemann commented 2 years ago

It would be awesome if this got fixed/merged. We've just got blocked by this as well when we removed net472 targets from our assemblies and only target netstandard2.0.

jbevain commented 2 years ago

Hi folks, sorry it took a while to get to, thankfully I should have more time in the new year :)

@SimonCropp somehow I'm not super excited at the idea of providing an API with a similar name as in the .NET Framework, even if it's only included on net standard builds. For instance, if you're referencing a Cecil built for netstandard in a .NET 4.x application you'll need to fully qualify StrongNameKeyPair because you'll see both, no?

We've added WriterParameters.StrongNameKeyBlob for the scenarios where StrongNameKeyPair is not available.

I understand that pushes the responsibility of using one or the other to the user instead of having this Cecil directly which is not great.

Maybe we could take this and move StrongNameKeyPair to a namespace like Mono.Security.Cryptography so that if you want to use our StrongNameKeyPair this is explicit and not part of the full Mono.Cecil namespace?

atlemann commented 2 years ago

Could it use only the internal StrongNameKeyPair for both .NET 4.x and netstandard?

SimonCropp commented 2 years ago

@jbevain done