13

新しい mvc 4 アプリケーションで初めて実行しようとしています PM> Enable-Migrations –EnableAutomaticMigrations

私は得ています:

Enable-Migrations : The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or 
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Enable-Migrations –EnableAutomaticMigrations

私は何が欠けていますか?ef5をインストールしました。

4

4 に答える 4

14

パッケージ マネージャー コンソールで次のように入力してみてください。

Install-Package EntityFramework -IncludePrerelease

その後、Visual Studio を再起動します。

于 2014-04-18T13:07:42.170 に答える
1

最初に「Install-Package EntityFramework -IncludePrerelease」を実行し、次に Visual Studio を管理者として再起動すると、うまくいきました。

[これを参照] : Package Manager Console Enable-Migrations CommandNotFoundException only in a specific VS project

于 2015-08-04T12:30:07.387 に答える
0

フレームワークをインストール (5.x) し、管理モードで実行した後、同じコマンドの実行を再試行しました。これで問題は解決しましたが、かなり奇妙です。

于 2014-03-20T09:17:50.873 に答える
0

プロジェクトのパス ディレクトリに角かっこ "[" がないことを確認する必要があります。どうやら VS 2013 は、角かっこで名前が付けられたプロジェクト フォルダーに満足していないようです。

于 2016-05-18T13:50:26.750 に答える