asp.net core 2.0 - Value cannot be null. Parameter name: connectionString

后端 未结 22 1932
时光取名叫无心
时光取名叫无心 2020-12-13 10:00

I had the following error in package manager console when Add-Migration

Value cannot be null. Parameter name: connectionString

22条回答
  •  醉话见心
    2020-12-13 10:06

    I had the same problem, because I was using the default value in Startup.cs. I just edited Configuration property from:

    public IConfiguration Configuration { get; }
    

    to:

    public IConfiguration Configuration;
    

    and it worked! If someone say why would be appreciated.

提交回复
热议问题