Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add EntityFramework.Commands to my DLL project? #3967

Closed
ryancole opened this issue Dec 3, 2015 · 3 comments
Closed

How to add EntityFramework.Commands to my DLL project? #3967

ryancole opened this issue Dec 3, 2015 · 3 comments

Comments

@ryancole
Copy link

ryancole commented Dec 3, 2015

Hi all, this is not an issue, I'm just confused and looking for a helpful explanation of how to work within the new dnx environment. I've got a solution with two projects in it - an ASP.NET project and a DLL project. I'm trying to use EF7 migrations, and so I'm trying to add EntityFramework.Commands to my DLL project. I keep getting the following error ...

Severity    Code    Description Project File    Line    Suppression State
Error   NU1002  The dependency EntityFramework.Commands 7.0.0-rc1-final in project League.Data does not support framework .NETPlatform,Version=v5.4.    League.Data C:\Users\Ryan\Projects\League\League.Data\project.json  27  

Here is the project.json file for my DLL project ...

{
  "version": "1.0.0-*",
  "description": "League.Data Class Library",
  "authors": [ "Ryan" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "commands": {
    "ef": "EntityFramework.Commands"
  },

  "frameworks": {
    "net451": { },
    "dotnet5.4": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Runtime": "4.0.21-beta-23516",
        "System.Threading": "4.0.11-beta-23516"
      }
    }
  },

  "dependencies": {
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "League.Entity": "1.0.0-*"
  }
}

Any advice on what I need to do to make these dependencies work? I'm a little confused. Thanks!

@rowanmiller
Copy link
Contributor

Try changing dotnet5.4 to netcore50 in your frameworks node in project.json. If that works, this is a known issue that is being looked into.

@CraigSelbert
Copy link

That worked for me.

Here is what I ended up with

{
  "version": "1.0.0-*",
  "description": "Domain Class Library",
  "authors": [ "Craig Selbert" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "frameworks": {
    "dnx451": { },
    "netcore50 ": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Runtime": "4.0.21-beta-23516",
        "System.Threading": "4.0.11-beta-23516"
      }
    }
  },
  "dependencies": {
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final"
  }
}

@bricelam
Copy link
Contributor

bricelam commented Dec 9, 2015

Dupe of #3879

@bricelam bricelam closed this as completed Dec 9, 2015
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants