ASP.NET Core 2.2 -> 3.0 upgrade. env.IsDevelopment() not found

The new IHostEnvironment, IsDevelopment, IsProduction etc. extension methods are in the Microsoft.Extensions.Hosting namespace which may need to be added to your app. Reference: https://learn.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&tabs=visual-studio#migrate-startupconfigure https://github.com/aspnet/AspNetCore/issues/7749

.NET Core MVC Page Not Refreshing After Changes

In ASP.NET Core 3.0 and higher, RazorViewEngineOptions.AllowRecompilingViewsOnFileChange is not available. Surprised that refreshing a view while the app is running did not work, I discovered the following solution: Add Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package to the project Add the following in Startup.cs: services.AddControllersWithViews().AddRazorRuntimeCompilation(); Here’s the full explanation for the curious.

Where are the Login and Register pages in an AspNet Core scaffolded app?

It was announced during the preview of asp.net core 2.1 that the Identity UI would be moved to a new Razor Class Library. https://blogs.msdn.microsoft.com/webdev/2018/03/02/aspnetcore-2-1-identity-ui/ It is still possible to scaffold the Identity Views into your own project if you prefer local views: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-2.1&tabs=visual-studio

Entity Framework Core: DbContextOptionsBuilder does not contain a definition for ‘usesqlserver’ and no extension method ‘usesqlserver’

First we install the Microsoft.EntityFrameworkCore.SqlServer NuGet Package: PM > Install-Package Microsoft.EntityFrameworkCore.SqlServer Then, after importing the namespace with using Microsoft.EntityFrameworkCore; we add the database context: services.AddDbContext<AspDbContext>(options => options.UseSqlServer(config.GetConnectionString(“optimumDB”)));