Skip to content

CoreCompat.System.Drawing dependency in 8.0.5+ versions causing System. conflicts #84

@harrisonwallace1

Description

@harrisonwallace1

Since the 8.0.5 version, the CoreCompat.System.Drawing package has been added to the NuGet dependencies.
This is causing issues in our .NET 8 application where that package is conflicting with built in framework features.

The type 'ICloneable' exists in both 'CoreCompat.System.Drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0a7ed9c2333b592' and 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'	
The type 'Color' exists in both 'CoreCompat.System.Drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0a7ed9c2333b592' and 'System.Drawing.Primitives, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Adding CoreCompat.System.Drawing to our project hasn't resolved the issue (as discussed in #74) as it is being bought in as a transiative dependency anyway.

This package looks like it has been referenced in the GlobalPayments.Api.csproj file since release: 0.0.3.4.

Is there a specific reason why this has been added as a dependency now? I am able to reproduce this error (see below) using a simple console app so the errors don't seem specific to our implementation.

NuGet Dependencies

GlobalPayments.Api 8.0.4

.NETStandard 1.3
Newtonsoft.Json (>= 9.0.1)
System.Net.Http (>= 4.3.0)
System.Net.Primitives (>= 4.3.0)
System.Net.Requests (>= 4.3.0)
System.Net.Sockets (>= 4.3.0)
System.Security.Cryptography.Algorithms (>= 4.3.0)
System.Xml.XmlDocument (>= 4.0.1)

GlobalPayments.Api 8.0.5

.NETStandard 1.3
CoreCompat.System.Drawing (>= 1.0.0-beta006)
NETStandard.Library (>= 1.6.1)
Newtonsoft.Json (>= 13.0.1)
System.IO.FileSystem (>= 4.3.0)
System.Net.Primitives (>= 4.3.0)
System.Net.Requests (>= 4.3.0)
System.Net.Security (>= 4.3.2)
System.Net.Sockets (>= 4.3.0)
System.Security.Cryptography.Algorithms (>= 4.3.0)
System.Threading.Thread (>= 4.0.0)
System.Xml.XmlDocument (>= 4.3.0)

Steps to Replicate

  • Create a new .NET 8 console app (also fails on .NET 6 and .NET 7)
  • Add the latest GlobalPayments.Api package
  • Create a class that implements ICloneable
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions