Cannot enable migrations for Entity Framework in class library

随声附和 提交于 2019-11-29 02:48:15

Oh wow, nevermind. I'm dumb.

In the Nuget package manager console there is a dropdown menu at the top labeled "Default Project:". Make sure you set that to the project you want to run the command against.

Hopefully this helps someone else avoid my embarrassing mistake.

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...).
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!