dotnet ef not found in .NET Core 3

后端 未结 8 1827
囚心锁ツ
囚心锁ツ 2020-12-02 04:35

I\'m following the docs in order to create an initial migration. When I execute dotnet, I get the help section, meaning that the PATH works properly.

Th

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 05:19

    EDIT: If you are using a Dockerfile for deployments these are the steps you need to take to resolve this issue.

    Change your Dockerfile to include the following:

    FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
    ENV PATH $PATH:/root/.dotnet/tools
    RUN dotnet tool install -g dotnet-ef --version 3.1.1
    

    Also change your dotnet ef commands to be dotnet-ef

提交回复
热议问题