Resolving "Multiple precompiled assemblies with the same name"

Viewed 1170

So I installed nsubstitute and sentry via openupm...

I am now getting errors

Multiple precompiled assemblies with the same name System.Threading.Tasks.Extensions.dll included or the current platform.

Only one assembly with the same name is allowed per platform.

(/Users/blahblah/Library/PackageCache/net.tnrd.nsubstitute@4.2.2/Runtime/System.Threading.Tasks.Extensions.dll)

and

Multiple precompiled assemblies with the same name System.Threading.Tasks.Extensions.dll included or the current platform.

Only one assembly with the same name is allowed per platform.

(/Users/blahblah/Library/PackageCache/io.sentry.unity@0.5.1/Runtime/System.Threading.Tasks.Extensions.dll)

The manifest.json looks like

{
  "dependencies": {
    ...,
    "net.tnrd.nsubstitute": "4.2.2",
    "io.sentry.unity": "0.5.1"
  },
  "scopedRegistries": [
    {
      "name": "package.openupm.com",
      "url": "https://package.openupm.com",
      "scopes": [
        "com.openupm",
        "io.sentry.unity",
        "net.tnrd.nsubstitute"
      ]
    }
  ]
}

and the package-lock.json contains

...

"io.sentry.unity": {
  "version": "0.5.1",
  "depth": 0,
  "source": "registry",
  "dependencies": {},
  "url": "https://package.openupm.com"
},
"net.tnrd.nsubstitute": {
  "version": "4.2.2",
  "depth": 0,
  "source": "registry",
  "dependencies": {},
  "url": "https://package.openupm.com"
},

...

As a way of resolving this, what I'd now like to do is exclude the System.Threading.Tasks.Extension from both dependencies and add an explicit dependency on it.

How do I do that?

Or if impossible, how do I resolve this? At least one duplicate needs to go but how do I achieve this in a way that plays nice with the package management?

0 Answers
Related