Cannot enable migrations for Entity Framework in class library

前端 未结 2 1711
滥情空心
滥情空心 2020-12-05 22:21

I just got on board with EF 5 and am using their code-first migrations tool but I seem to get an error when I try to enable migrations.

I type Enable-Migration

2条回答
  •  没有蜡笔的小新
    2020-12-05 23:07

    There are actually 3 ways to make Nuget commands run in a specific project:

    1. [Package Manager Console] Set the active project in the dropdown at the top of the console toolwindow
    2. [Package Manager Console] Look for a parameter to specify the project. For some cmdlets I've seen -ProjectName and some use -Project
    3. [Solution Explorer] Right-click the project you want, and use the graphical package manager window (Manage NuGet Packages...).

提交回复
热议问题