-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CSHARP-1276: Provide Strong-Named Assemblies #1393
Conversation
if (publicKeyToken == "null") | ||
if (publicKeyToken == "null" || | ||
// MongoDB's assemblies should use "type name, assembly name" discriminator format for backward compatibility | ||
(assembly.FullName.StartsWith("MongoDB") && publicKeyToken == "94992a530f44e321")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to add this condition for backward compatibility, because now we have strongly named assemblies and without this changes we would use fully qualified type name here, what would be a breaking change.
@@ -16,6 +16,7 @@ | |||
using System; | |||
using System.Runtime.CompilerServices; | |||
using System.Runtime.InteropServices; | |||
using System.Security.Cryptography.X509Certificates; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this using needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think public signing an assembly is a breaking change and should have been part of a new major version. A library built with any of the previous unsigned versions will not be able to be consumed by a project which upgrades to the new, signed version. The two are not assembly compatible, and this applies to .NET Core as well. Mongo2Go library for example seems ok, but see this issue for example: Xabaril/AspNetCore.Diagnostics.HealthChecks#2265 I'm not sure the implications of this change were all assessed before proceeding. |
The Mongo diagnostic source is also impacted by this change I would expect a number of projects that use the MongoDB drivers are going to be impacted. |
To add to the above comments. This has also broken some of our dependencies. I agree that this should have been part of a major version. We now have to pin ourselves to 2.27.0 until all of our dependencies are also updated: |
just echoing that this broke things for my org to cause we use: https://github.com/ChangemakerStudios/serilog-sinks-mongodb which has been on 2.19.0 for years |
No description provided.