Problem with migration after change to .net 3.0 from 2.0
PM> Add-Migration InitialCreate
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: C:\root.nuget\packages\microsoft.aspnetcore.identity.ui\3.0.0\staticwebassets\V4
Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
My startup
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((ctx, config) =>
{
config.AddJsonFile("appsettings.json");
config.AddEnvironmentVariables();
})
.UseStartup<Startup>();
}
See here for similar issue and solution https://stackoverflow.com/questions/45782446/unable-to-create-migrations-after-upgrading-to-asp-net-core-2-0
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Questions are community supported only and the authors/maintainers may or may not have time to reply. If you or your company would like commercial support, please see here for more information.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.