aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

class library project

Open himadrinath opened this issue 11 years ago • 15 comments

In my class library project using rc1-final when i added "EntityFramework.Commands": "7.0.0-rc1-final", dependency in my project i getting an error saying this dependency does not support framework .NETPlatform,Version=v5.4.

Image entityframework commands

himadrinath avatar Nov 19 '15 19:11 himadrinath

@divega @bricelam

Eilon avatar Nov 19 '15 21:11 Eilon

I encountered this error also and the only way to get around it that I found was to change the target from dotnet5.4 to dnxcore50 in my class library projects. Maybe there is a better solution.

joeaudette avatar Nov 19 '15 21:11 joeaudette

Interesting. We target dnxcore50 and netcore50. @davidfowl @anurse Does DNX support authoring a package with the NuGet 3 ref stuff? We probably need the package to look something like this to make it work:

  • lib/
    • net451/
    • dnxcore50/
    • netcore50/
  • ref/
    • dotnet5.4/

bricelam avatar Nov 19 '15 23:11 bricelam

@joeaudette i tried that way but when i running dnx ef command also getting an error in their.

dnx_ef

i am stuck i don't know how to fix it...............

himadrinath avatar Nov 20 '15 06:11 himadrinath

@himadrinath as a workaround, you should be able to add dnxcore50 to your class library's list of frameworks.

bricelam avatar Nov 20 '15 17:11 bricelam

@joeaudette @bricelam i did as u say i changed dotnet5.4 to dnxcore50 in my project.json.

class library ef

but after that when i run dnx ef command i got a another error.

please guide me through this problem. still not able to fix it and not able to run migration in my project.

himadrinath avatar Nov 21 '15 05:11 himadrinath

You'll either need to add dnx541 to the frameworks, or run this before invoking dnx ef:

dnvm use default -r coreclr

bricelam avatar Nov 21 '15 19:11 bricelam

Is EntityFramework.Commands a library or exe?

davidfowl avatar Nov 21 '15 23:11 davidfowl

@bricelam i changed the run time into coreclr and then run the dnx ef command and another problem arrive.

coreclr Architecture showing x64 but i am using 32 bit windows 8.1 os

1 0 0-rc1-final

himadrinath avatar Nov 22 '15 06:11 himadrinath

@davidfowl ...a dll with a static Main entry point at the moment. The architecture will change a bit for RC 2.

bricelam avatar Nov 23 '15 02:11 bricelam

Any news about this problem? I am following this doc: http://docs.efproject.net/en/latest/getting-started/aspnet5/existing-db.html

and when try to install the EF into a separate class library (package) - I am getting the error described above.

tmarinov avatar Dec 08 '15 15:12 tmarinov

@tmarinov The workaround should still work. Add dnx451 or dnxcore50 to your target frameworks.

bricelam avatar Dec 09 '15 18:12 bricelam

@davidfowl @glennc Any updates on how to author a package with a ref assembly using project.json?

bricelam avatar Dec 09 '15 18:12 bricelam

That's not going to be first class anytime soon. First class support for bait and switch is not being worked on.

davidfowl avatar Dec 09 '15 18:12 davidfowl

Nuts. More nupkg patching it is...

bricelam avatar Dec 09 '15 18:12 bricelam