To set the ASPNETCORE_ENVIRONMENT variable in Package Manager Console (PMC) , inside visual studio, to Production use this command first
$env:ASPNETCORE_ENVIRONMENT='Production'
Then you can use
Update-Database
normally.
More Related Contents:
- How do you multi-target a .NET Core class library with csproj?
- How to instantiate a DbContext in EF Core
- auto create database in Entity Framework Core
- Filter all queries (trying to achieve soft delete)
- How to add the same column to all entities in EF Core?
- Command dotnet ef not found
- Auto Versioning in Visual Studio 2017 (.NET Core)
- How to unapply a migration in ASP.NET Core with EF Core
- Cascade deleting with EF Core
- Could not load file or assembly Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0
- How to seed in Entity Framework Core 2?
- How to auto create database on first run?
- Entity framework EF.Functions.Like vs string.Contains
- EF Core queries all columns in SQL when mapping to object in Select
- How to refresh an Entity Framework Core DBContext?
- Entity Framework Core: `SqlNullValueException: Data is Null.` How to troubleshoot?
- How to get user information in DbContext using Net Core
- How should I manage DbContext Lifetime in MVC Core?
- How to resolve .net core build error NETDSDK1061 and warning MSB3277
- Filtering on Include in EF Core
- How to get HttpContext.Current in ASP.NET Core? [duplicate]
- Is ConfigurationManager.AppSettings available in .NET Core 2.0?
- How to load assemblies located in a folder in .NET Core console app
- Asp.Net core long running/background task
- Manipulating images with .NET Core
- Is there an Entity Framework 7 Database-First POCO Generator?
- Working with SQL views in Entity Framework Core
- How to run a .NET Core console application on Linux [duplicate]
- Filter Serilog logs to different sinks depending on context source?
- Error while executing test, if using CreateResponse extention method to return Azure Function HttpResonseMessage