6
votes

I have the community version of VS2015. I can create a console app and build it no problem. Once I run the package manager and install the entityframework and then build it again it gives me the above error.

I have DNX installed. I have tried to uninstall VS 2015 and reinstall but to no avail. This has happened because I tried to to install MVC boilerplate found a this address: http://rehansaeed.com/asp-net-mvc-boilerplate/ I have since uninstalled it but DNX seems to remain and now I have that error.

It may be a simple fix however I am a beginner at this and cant figure it out. Anyone like to give me a few ideas as to what this is and how to fix it I would be appreciative.

1
I think you need to update to EF7, as prior versions of EF don't support PCL. - Brendan Green
Winner. Used "Install-Package EntityFramework.MicrosoftSqlServer –Pre" and it now builds. Thankyou. - si2030
@si2030 I'm getting the same error how did you fix it? Where did you run that command? - erotavlas
@erotavlas You can run this in the Package Manager Console. This will appear at the bottom of the VS2015 window along with Output, Error List , Command Window etc. If it is not showing then go to Tools/NeGet Package Manager and click on Package Manager console. This will bring it up. In there just copy in "Install-Package EntityFramework.MicrosoftSqlServer –Pre". You will also have to add in "Install-Package EntityFramework.Commands -pre" and then go to the Project.json file and under "Commands" add in "ef": "EntityFramework.Commands" under "web": "Microsoft.AspNet.Server.Kestrel" and rebuild - si2030
I ran the above commands but they did not solve the problem for me. What seems to have solved the problem is running those commands and then deleting the line "EntityFramework": "6.1.3" from project.json. Everything builds now, but I can't say with certainty that this won't create more issues. - Brendan L

1 Answers

1
votes

Replace Entity FrameWork "EntityFramework": "6.1.3" with "EntityFramework.Commands": "7.0.0-rc1-final".

It work properly then build it.