Microsoft.data.entity is missing in MVC 6 (Visual Studio 2015)

I created an MVC 6 project in Visual Studio 2015.

I am trying to create a class library of First Entity class

{ "version": "1.0.0-*", "description": "DB Class Library", "authors": [ "Michael" ], "tags": [ "" ], "projectUrl": "", "licenseUrl": "", "dependencies": { "System.Collections": "4.0.10-beta-23019", "System.Linq": "4.0.0-beta-23019", "System.Threading": "4.0.10-beta-23019", "System.Runtime": "4.0.10-beta-23019", "Microsoft.CSharp": "4.0.0-beta-23019", "System.ComponentModel.Annotations": "4.0.10", "System.Data.Entity.Repository": "2.0.0.1", "EntityFramework.SqlServer": "7.0.0-beta5", "EntityFramework.Commands": "7.0.0-beta5", "Microsoft.Data.Edm": "5.6.5-beta" }, "frameworks": { "dotnet": { } } } 

This is my project.json file.

The lesson now says that I should add "Microsoft.Data.Entity". However, I am missing this link, so I cannot add this library. I need this library, so I can create my own DBContext class.

+4
source share
2 answers

If the same problem, the project did not load all the libraries at the beginning. A fix has been added, and now everything is fine.

Problem: Opening the package manager console creates a message:

"Windows PowerShell successfully updated your execution policy, but the parameter is overridden by a policy defined in a more specific area. Because of the override, your shell will retain its current effective Unrestricted execution policy. Type" Get-ExecutionPolicy - List "to view the execution policy settings. Additional see the Get-Help Set-ExecutionPolicy section for details.

But the PowerShell prompt never appears. Similarly, an attempt to install a package creates the same message when trying to execute a script file from a package, and then:

Installation error. Rollback ...

Attempting to upgrade an existing package creates:

Failed to initialize PowerShell host. If the PowerShell execution policy setting is set to AllSigned, open the Package Manager console to initialize the host first.

Solution Hot fix explanations and links are available at https://github.com/NuGet/Home/issues/974#issuecomment-124774650 A fix is ​​now available for installation, and we are sure that it will unlock you. Please take the installation from one of these places accordingly:

3.1.1 for VS 2015: https://github.com/NuGet/Home/releases/download/3.1.1/NuGet.Tools.vsix

We will publish them in the Visual Studio gallery next week.

+1
source

Change dotnet to dnx451

 "frameworks": { "dnx451": { } } 
0
source

All Articles