Add assembly strong name. - #82
Conversation
fa5a1ca to
e98894e
Compare
|
@tmds ping. |
|
I will make some time for this tomorrow. |
|
@tmds Thank you! |
| _moduleBuilder = _assemblyBuilder.DefineDynamicModule(Tmds.DBus.Connection.DynamicAssemblyName); | ||
| var keyStream = typeof(DynamicAssembly).GetTypeInfo().Assembly.GetManifestResourceStream("Tmds.DBus.sign.snk"); | ||
| if (keyStream == null) throw new InvalidOperationException("'Tmds.DBus.sign.snk' not found in resources"); | ||
| var keyBuffer = new byte[keyStream.Length]; |
There was a problem hiding this comment.
Should we hard-code these bytes in order to not have to pack Tmds.DBus.sign.snk?
Is this the same data as the hex-encoded PublicKey in DynamicAssemblyName?
There was a problem hiding this comment.
It is possible but looks a little strange. snk in resources add a similar amount of bytes.
|
@mfilippov Thanks for adding this. haven't used strong naming in real life. I'm curious to learn a bit more. I guess you need this because you want to strong name your own assembly? Do you have a strong reason to strong name your assembly? Or is is also a requirement that ripples down on you? You're signing 3 things: Tmds.DBus, Tmds.DBus.Tool, and the dynamic assembly: Tmds.DBus.Emit. Do you need all 3 to be strongly named? PR looks good, just a few nits. |
|
@tmds Without strong name assembly could not be identified by version. And if you have a strong name on the entry point, you can't load assembly without a strong name. We want to use Avalonia in our project, which has a strong-named entry point. |
|
@tmds Thank you! Could you publish a new version on nuget.org? |
|
Thanks @mfilippov! I'll release a new version of Tmds.DBus by next week. |
|
@mfilippov it took a week longer, but available now in 0.9.0 on nuget.org. |
|
@tmds Great thank you! |
Add strong name to allow use this library in projects with strong names.