When I am running Add-Migrations I am getting the following error message
An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: Configuration value 'Info' is not supported.
Unable to create an object of type 'MyContext'. Add an implementation of 'IDesignTimeDbContextFactory<MyContext>' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
When I change the appsettings.developments, LogLevel-->Default = Debug everything works well even without having the IDesignTimeDbContextFactory and keeping the method CreateWebHostBuilder as it is.
EF Core version: 2.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 7
IDE: (e.g. Visual Studio 2017 15.8)
@daniloak Can you post a runnable/project solution that demonstrates the behavior you are seeing so that we can investigate further.
I edited the issue, I also added a video showing the issue, please, do not consider the "notepad" part in the video
@daniloak I downloaded your project and tried running various migration commands. They all worked fine for me, which suggests something about your machine setup. I would try clearing your NuGet caches, reinstalling the .NET Core SDK, and possibly Visual Studio.
Did you use Debug or Info in the log level?
@daniloak I didn't change anything. I expected the project to be setup to reproduce the issue you are seeing.
Again with the parameter changed.
@daniloak Thanks, I am able to reproduce this now--we will investigate.
You cannot use just Info you need to use exact string version of the LogLevel enum as in this file. https://github.com/aspnet/Logging/blob/master/src/Microsoft.Extensions.Logging.Abstractions/LogLevel.cs
Changing Info to Information makes it work.