[CSHARP-3571] Strong name issues Created: 13/Apr/21 Updated: 19/Apr/21 Resolved: 19/Apr/21 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Packaging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eddy Nakamura | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows using C# |
||
| Issue Links: |
|
||||||||
| Description |
|
Hi,
I started to use the MongoDB packages in a C# environment. I recently saw that the package is signed but the DLLs are still no signed or without strong name. With that, when you have a project that signs the DLLs, I can't use MongoDB at all (I call mongodb DLLs using reflection).
Below the error: 1>CSC : warning CS8002: Referenced assembly 'MongoDB.Driver, Version=2.12.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.
Do you have a plan to make the dll's strong named? If not, can you share somehow a way to just connect in a database using TcpClient?
Thank you. |
| Comments |
| Comment by Dmitry Lukyanov (Inactive) [ 19/Apr/21 ] |
|
Hello ednakamu@microsoft.com,
no, there is no such way |
| Comment by Eddy Nakamura [ 15/Apr/21 ] |
|
Hi, when you upload to nuget.org, the package is automatically signed by nuget.org. For that thread and looking for Microsoft guidance (that is in the comments thread), it's recommended to strong naming it. But yes. Not a lot of consensuses if should/should not strong name it.
I tried to inject with ildasm/ilasm/sn, but there are functions/methods that didn't work properly. I also tried just to understand the portion of the code where MongoDb authenticates, but that is a lot of source code.
Thank you |
| Comment by Dmitry Lukyanov (Inactive) [ 13/Apr/21 ] |
|
Hello ednakamu@microsoft.com ,
not sure what you mean here, our NuGet package is not signed.
please see this comment in similar ticket: https://jira.mongodb.org/browse/CSHARP-1276?focusedCommentId=3699110&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-3699110
I don't think that there is a simple way to do it since you need to use a binary wire protocol to work with the server. we're considering work to add strong-named versions of our libraries for further releases, currently, we don't have a particular roadmap but we will keep you informed here |