Reputation: 31
Trying to get Entity Framework 7 to work in my ASP.NET 5 Beta8 project. I have references to EntityFramework.SqlServer 7.0.0-beta8 and EntityFramework.Commands 7.0.0-beta8 packages in my references.
Yet when I go to the Nuget Package Manager Console and type:
Enable-Migrations
The EntityFramework package is not installed on project "My Project"
And Add-Migration
Add-Migration InitialMigration
The EntityFramework package is not installed on project "My Project"
The default project in the console is set to the correct project.
Upvotes: 0
Views: 3215
Reputation: 1
You need to add Package in order to get it it working , i have resolved my issue using this. Install-Package Microsoft.EntityFrameworkCore.Tools -Version 3.1.9 as per https://learn.microsoft.com/en-gb/aspnet/core/data/ef-mvc/migrations?view=aspnetcore-3.1#pmc
Upvotes: 0
Reputation: 1446
The migrations experience in ASP.NET 5 is still a work-in-progress. The following steps are overly complex and will be simplified by the time we reach a stable release.
cd
command to navigate to the project directorydnvm use 1.0.0-beta8
dnx ef migrations add MyFirstMigration
to scaffold a migration to create the initial set of tables for your model.dnx ef database update
to apply the new migration to the database.Because your database doesn’t exist yet, it will be created for you before the migration is applied.
Source: Entity Framework 7 documentation
Upvotes: 1
Reputation: 7304
No, not yet. You should use the new dnx command form the command prompt see dnx ef --help for more information
Be sure you run dnvm use to set the correct dnx version
Upvotes: 0