In our most recent release of the MongoDB .NET/C# driver (v2.28), we chose to Strong Name our assemblies. This was a deliberate and thoughtful choice that we decided to make after taking into account many factors, some of which are listed below:
- We had seen increasing demand over the years in the need for strong-named assemblies. Even though the request itself alludes to providing a strong named assembly in addition to a non strong named one, Microsoft does not recommend publishing two versions of the same library. Moreso, we did not want the overhead of maintaining two different flavors of our library as we work towards the next major version of our driver.
- While Strong Naming does not provide any material benefits for .NET Core and .NET 5+, we still have a significant number of users using MongoDB with .NET Framework. Hence we wanted to release a 2.x version that supports Strong Naming so users can benefit from this change without needing a major version upgrade.
We understand that this should’ve been listed as a breaking change at a minimum and we’ve rectified that now in our documentation. - The ecosystem has evolved since Strong Naming was initially introduced and the requests were made but the overarching benefits of Strong Naming still stand true.
While this change should not impact the majority of users, we recognize that this change may cause some issues in the following cases:
- Your project has multiple dependencies that use the MongoDB.Driver library
- Your project uses reflection for assembly loading
As a developer, if you are using a third-party NuGet package that includes or depends on our driver and want to update to the latest version of the driver, then the only available workarounds are:
- Delay Updating: Hold off on updating the Driver until the dependent libraries have released their updated versions. While this may take some time, we are ready to assist in coordinating with library maintainers to expedite their updates. Please let us know how we can help.
- Manual Update: Fork the third-party libraries and manually update the strong-named Driver. Though this is a more tedious process, it will enable you to use the latest Driver version.
We urge open source maintainers to update their dependent packages with Strong Named versions. We apologize for the inconvenience that this may cause but we appreciate your patience and understanding in this journey and can’t wait to share more updates with you that our team has been working on!