-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request - strong naming of NuGet packages #3127
Comments
@jsteinich do you have any insights / opinions on this? Primarily, are there any downsides for strong naming that we should be aware of? |
I've never personally used them. I've also not really come across libraries actually doing it.
|
I am also pleased that the newer runtimes no longer have a need for strong naming. However, .NET Framework applications are still very common, where strong naming still matters. This is why their recommendation to strongly name open-source libraries (I quoted above) includes the notion that this only affects .NET Framework. For us, all applications we have developed for clients involving .NET Framework, also involve strongly named packages. So far we have come across one (not counting CDKTF) dependency that we needed that was not, which we had to disassemble, recompile and publish to a private repository to be able to use. Because this is anecdotal, I can not be sure how representative this is for the CDKTF audience, but it our personal experience. Note: We also saw different approaches in how project tackle this issue. E.g. DotNetRDF is strongly named by default, but Scriban publishes two packages: Scriban and Scriban.Signed. I am not sure what the rationale is for the split. EDIT: .NET Framework also has this, ehm, diverging support policy tying it to that of Windows, so it's not going anywhere anytime soon it seems: https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-framework EDIT 2: We strong name our assemblies by adding the following to a top-level (i.e. git repository root)
For generating the key, we use
For us, this works with people developing on Windows, Linux, and I think I built it on macOS that one time. Linux-based CI that publishes the strong named assemblies. (These are all .NET Standard, and get used by clients in .NET Framework environments.) EDIT 3: Note that (as indicated by the MS docs) for OSS it's fine to keep the key in the repository, of course as long as it has not been used for confidential purposes in the past. Example: https://github.com/dotnetrdf/dotnetrdf/blob/main/Build/dotNetRDF.snk |
cdktf isn't compatible with .NET Framework. It should be able to reference any .NET Standard libraries (strong-named or not), but it won't be available to use .NET Framework environments (regardless of strong-naming). |
Since cdktf isn't compatible with .NET Framework anyway, it doesn't make sense for us to make this change. |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Would it be possible to provide strong named assemblies for the CDKTF libraries published on NuGet?
My current impression is that this would be according to Microsoft guidelines:
https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming
Thank you for your consideration.
References
No response
Help Wanted
Community Note
The text was updated successfully, but these errors were encountered: