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

Comments

Projects
None yet
4 participants
@ryancole

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

This comment has been minimized.

Show comment
Hide comment
@rowanmiller

rowanmiller Dec 8, 2015

Member

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.

Member

rowanmiller commented Dec 8, 2015

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

This comment has been minimized.

Show comment
Hide comment
@CraigSelbert

CraigSelbert Dec 8, 2015

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"
  }
}

CraigSelbert commented Dec 8, 2015

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

This comment has been minimized.

Show comment
Hide comment
@bricelam

bricelam Dec 9, 2015

Member

Dupe of #3879

Member

bricelam commented Dec 9, 2015

Dupe of #3879

@bricelam bricelam closed this Dec 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment