私は新しいエンティティフレームワークコア(ASP.Netと一緒にはなく、私がコーディングしているのはWinFormsアプリケーションだけです)を探求しており、「移行」を作成するために必要なdotnet
コマンドラインコマンドについてのチュートリアルをいくつか見つけました。しかし、私はそれを試してみると、 'dotnet' is not recognized as an internal or external command, operable program or batch file.
と言い'dotnet' is not recognized as an internal or external command, operable program or batch file.
私は "dotnet.exe"、 "dotnet.bat"、 "dotnet.cmd"のハードドライブを検索しましたが、何も見つかりませんでした。私はVisual Studio 2015 Community Editionを使用しています。このコマンドはどこで実行可能ですか?それが動作するためには、 %PATH%
環境変数に何を追加する必要がありますか?
私はちょうど答えを自分で見つけた。 dotnet
ツールがVisual Studioにインストールされていないようです。 Visual Studio用の.NETコアツールプレビューのインストール(.NET Core 1.0.1ツールのプレビュー2: DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exeへの直接リンク)では、 %ProgramFiles%\dotnet\dotnet.exe
dotnet %ProgramFiles%\dotnet\dotnet.exe
dotnetを追加して問題を解決しました%ProgramFiles%\dotnet\dotnet.exe
。
私はこの後、別の問題に直面しました: dotnet
ツールは実行していますが、 No executable found matching command "dotnet-ef"
とNo executable found matching command "dotnet-ef"
が、これは別の問題です。しかし、一度見つけたらここで解決策を共有します。
更新:
約束どおり、私は直面しているthext問題に関する質問と回答です( No executable found matching command "dotnet-ef"
エラー)。
そして、次の解決策はここにあり ... violates the constraint of type 'TContext'
( ... violates the constraint of type 'TContext'
ます)