cecil icon indicating copy to clipboard operation
cecil copied to clipboard

add strong naming support for netstandard

Open SimonCropp opened this issue 4 years ago • 6 comments
trafficstars

SimonCropp avatar Oct 21 '21 09:10 SimonCropp

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

SimonCropp avatar Nov 07 '21 09:11 SimonCropp

@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.

jbevain avatar Nov 08 '21 19:11 jbevain

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.

atlemann avatar Jan 12 '22 10:01 atlemann

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?

jbevain avatar Jan 13 '22 00:01 jbevain

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

atlemann avatar Feb 04 '22 14:02 atlemann

@jbevain done

SimonCropp avatar Feb 10 '22 01:02 SimonCropp