Skip to content

Commit

Permalink
Update instructions for installing dotnet ef
Browse files Browse the repository at this point in the history
Fixes #1588
  • Loading branch information
bricelam committed Oct 5, 2020
1 parent 4eda594 commit 3f2f4cc
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions entity-framework/core/get-started/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ uid: core/get-started/install/index

To add EF Core to an application, install the NuGet package for the database provider you want to use.

If you're building an ASP.NET Core application, you don't need to install the in-memory and SQL Server providers. Those providers are included in current versions of ASP.NET Core, alongside the EF Core runtime.
If you're building an ASP.NET Core application, you don't need to install the in-memory and SQL Server providers. Those providers are included in current versions of ASP.NET Core, alongside the EF Core runtime.

To install or update NuGet packages, you can use the .NET Core command-line interface (CLI), the Visual Studio Package Manager Dialog, or the Visual Studio Package Manager Console.

Expand Down Expand Up @@ -55,7 +55,7 @@ For more information, see [NuGet Package Manager Dialog](/nuget/tools/package-ma

* To install the SQL Server provider, run the following command in the Package Manager Console:

``` PowerShell
``` PowerShell
Install-Package Microsoft.EntityFrameworkCore.SqlServer
```

Expand All @@ -77,7 +77,7 @@ Two sets of tools are available:

Although you can also use the `dotnet ef` commands from the Package Manager Console, it's recommended to use the Package Manager Console tools when you're using Visual Studio:

* They automatically work with the current project selected in the PMC in Visual Studio, without requiring manually switching directories.
* They automatically work with the current project selected in the PMC in Visual Studio, without requiring manually switching directories.

* They automatically open files generated by the commands in Visual Studio after the command is completed.

Expand All @@ -87,11 +87,21 @@ Although you can also use the `dotnet ef` commands from the Package Manager Cons

.NET Core CLI tools require the .NET Core SDK, mentioned earlier in [Prerequisites](#prerequisites).

The `dotnet ef` commands are included in current versions of the .NET Core SDK, but to enable the commands on a specific project, you have to install the `Microsoft.EntityFrameworkCore.Design` package:
* `dotnet ef` must be installed as a global or local tool. Most developers prefer installing `dotnet ef` as a global tool using the following command:

```dotnetcli
dotnet add package Microsoft.EntityFrameworkCore.Design
```
```dotnetcli
dotnet tool install --global dotnet-ef
```

`dotnet ef` can also be used as a local tool. To use it as a local tool, restore the dependencies of a project that declares it as a tooling dependency using a [tool manifest file](/dotnet/core/tools/global-tools#install-a-local-tool).

* To update the tools, use the `dotnet tool update` command.

* Install the latest `Microsoft.EntityFrameworkCore.Design` package.

```dotnetcli
dotnet add package Microsoft.EntityFrameworkCore.Design
```

> [!IMPORTANT]
> Always use the version of the tools package that matches the major version of the runtime packages.
Expand Down

0 comments on commit 3f2f4cc

Please sign in to comment.