IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Problem with migration after change to .net 3.0 from 2.0

Open HelloMyDevWorld opened this issue 6 years ago • 3 comments

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>();
    }

HelloMyDevWorld avatar Jan 22 '20 21:01 HelloMyDevWorld

See here for similar issue and solution https://stackoverflow.com/questions/45782446/unable-to-create-migrations-after-upgrading-to-asp-net-core-2-0

morrisond91 avatar Jan 31 '20 09:01 morrisond91

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.

stale[bot] avatar Feb 14 '20 10:02 stale[bot]

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.

lock[bot] avatar Mar 22 '20 13:03 lock[bot]