Efcore: Unrecognized option '--environment' when using dotnet cli tools

Created on 14 Mar 2019  路  1Comment  路  Source: dotnet/efcore

As per the following comment by @bricelam:
https://github.com/aspnet/EntityFrameworkCore/issues/7353#issuecomment-270718816

I ran this:
dotnet ef database update --startup-project ../<my_project> --environment Development

This gives:
Unrecognized option '--environment'

I'm using:
.NET Command Line Tools (2.1.504)

closed-question customer-reported

Most helpful comment

The --environment options was removed in version 2.0. Use this instead:

set ASPNETCORE_ENVIRONMENT=Development
dotnet ef database update --startup-project ../<my_project>

>All comments

The --environment options was removed in version 2.0. Use this instead:

set ASPNETCORE_ENVIRONMENT=Development
dotnet ef database update --startup-project ../<my_project>
Was this page helpful?
0 / 5 - 0 ratings