Entity Framework code first migrations throwing error

后端 未结 9 1835
再見小時候
再見小時候 2021-02-13 20:17

Here is what I did before I got this error:

  1. Installed EF (the pre release version, 6 maybe, I dunno)
  2. decided I did not want, so uninstalled that and reins
9条回答
  •  不要未来只要你来
    2021-02-13 20:55

    I figured out the problem. EntityFramework.dll needed to be in the GAC for Visual Studio to use it from the package manager.

    1. Start Visual Studio Command Prompt (ensure you started Visual Studio as Administrator)
    2. Go to your packages directory and find the EntityFramework package directory.
    3. Go to lib\net45 (if targeting 4.5)
    4. type: gacutil /i EntityFramework.dll

    Note: It may be wise to restart the computer entirely at this point.

    I'm not sure why Visual Studio stopped seeing the DLL, but this got me past this problem.

提交回复
热议问题