Build failing on .net Core app due to missing definition

前端 未结 3 2117
别跟我提以往
别跟我提以往 2021-02-18 14:27

I\'m trying to build my .NET Core app from the CLI using dotnet build, but every single time I get this error:

\'IConfigurationBuilder\' doe

3条回答
  •  醉梦人生
    2021-02-18 14:53

    You need the Microsoft.Extensions.Configuration namespace in scope to get that extension method. Either fully qualify it, or add this to the top of your file:

    using Microsoft.Extensions.Configuration;
    

    You also will need the NuGet reference Microsoft.Extensions.Configuration.EnvironmentVariables.

提交回复
热议问题