Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1552

Tests under CSharp515Tests fail when assemblies are signed

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 2.2.2
    • Testing
    • None
    • Fully Compatible

    Description

      If the Mongo driver assemblies are signed then tests CSharp515Tests.TestLength0/1/2 fail. This is because the testing type S<> is now a "signed" type and will emit a different full-name in JSON other than that specified in the expectation.

      It's quite convoluted to recreate this. But steps are

      • Change all InternalsVisibleTo attributes to contain the public key (as when signed must reference signed)
      • Either:
        • Modify each library project file to sign the assembly
        • Add to properties collection in build.fsx
          • "SignAssembly", "true"
          • "AssemblyOriginatorKeyFile", <path to key file>
      • Run unit tests

      It's almost too trivial to report, but given that this is the only test that fails and the fix is so simple it might make sense to patch (pull incoming).

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            jhadwen James Hadwen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: