Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Design-time facades shouldn't be added to the nuspec for Full .NET #2031

Closed
bricelam opened this issue Jun 8, 2015 · 5 comments
Closed

Design-time facades shouldn't be added to the nuspec for Full .NET #2031

bricelam opened this issue Jun 8, 2015 · 5 comments

Comments

@bricelam
Copy link
Contributor

bricelam commented Jun 8, 2015

{
  "dependencies": {
    "System.Collections.Immutable": "1.1.36"
  },
  "frameworks": {
    "net45": {
      "dependencies": {
        "System.Collections": "4.0.0.0"
      }
    }
  }
}

The reference to System.Collections is required to build on DNX, but if you try to install the resulting nupkg into a net45 project, you'll get the following error.

Multiple assemblies with equivalent identity have been imported: 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Collections\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Collections.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.dll'. Remove one of the duplicate references.

The workaround is to declare it as a built-time dependency.

{
  "System.Collections": { "version": "4.0.0.0", "type": "build" }
}
@herecydev
Copy link

May be related to what I raised just hours ago.

@Eilon
Copy link
Member

Eilon commented Aug 5, 2015

Hmm but is this actually correct? Isn't the reference needed? Is the package itself just broken?

@davidfowl
Copy link
Member

The unfortunate thing about this is that the msbuild based projects fail instead of noop. I would love to get that fixed instead of mimicking that behavior in the dnx

@jonesopolis
Copy link

thanks for the fix brice. Was killing me.

@muratg
Copy link
Contributor

muratg commented Dec 18, 2015

This issue was moved to dotnet/cli#578

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants