Strong naming #651
Replies: 3 comments 5 replies
-
I would hope that we can do strong naming, and I think |
Beta Was this translation helpful? Give feedback.
-
@Perksey Check out the two links at the top of my original post here. They link to the relevant Microsoft documentation that says public APIs should be strong-named, and also a comment from Tanner on another library that is also not strongly-named, Stylet. As far as the TFMs to strong-name, if you want me to include all of them then I will remove the |
Beta Was this translation helpful? Give feedback.
-
I think I may abandon this for now. Perhaps a better time to pick this up is during or after you complete the I don't mind picking this back up in the future when it is easier to interact with the solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
According to Microsoft guidelines, public libraries should be strong-named. Today, I posted a similar discussion on the Stylet repo and had Tanner chime in with specifics. Please take a look at his comments there.
I started playing around in my fork with adding strong naming. Unfortunately, some of the NuGet packages that Silk.NET relies on are not strong-named, meaning Silk.NET itself cannot be strong-named in those cases. Unfortunately, the Silk.NET solution is so huge and relies on things I just can't get to work properly like Android SDKs that I am unable to build the entire solution to test my changes (the thousands of warnings during build do not help). I would have to submit a PR and then analyze the CI build to see if the changes work.
See the changes in my fork (ignore the accidental solution file changes as they are not required):
https://github.com/nathan-alden-sr/Silk.NET/commit/da3c192be295861b07e5956d5ae22a8fe0728a58(fork recreated) https://github.com/nathan-alden-sr/Silk.NET/commit/a38c88b693ca18c6c7d305e6dbab24d35cb1f05f.I took the approach that a
src/Directory.Build.props
file was the best place to configure the strong-naming properties. This is how I do it in several of my own projects. This avoids unnecessarily strong-naming test and sample projects. I added aCondition
to the<PropertyGroup>
that restricts strong naming tonet5.0
and above. We may want to change this due to mobile TFMs; not sure.After making my changes, I built
Silk.NET.Maths
with this command:Then, I verified the strong name with this command:
I also verified that
Silk.NET.Maths
was not strong-named when built with thenetstandard2.0
TFM:Beta Was this translation helpful? Give feedback.
All reactions