I had the following error in package manager console when Add-Migration
Value cannot be null. Parameter name: connectionString
I had the same problem and what it is the I had to make sure that the name of the connection matches:
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddDbContext(options => options.UseSqlServer(Configuration["ConnectionStrings:DefaultConnection"]));
which ****ConnectionStrings:DefaultConnection*** it was where I had the whole problem. Make sure that is the same in Startup.cs and appsettings.json(appsettings.Development.json in Vs 2019)
After I fixed this, everything was fine.