且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

控制台应用程序的配置 .net Core 2.0

更新时间:2023-02-13 08:00:56

似乎没有变化,正如 Jehof 所说.

It seems there is no change, as Jehof says.

ConfigurationBuilder 在它自己的包中,正如 Jeroen Mostert 所说.

ConfigurationBuilder is in its own package, as Jeroen Mostert says.

但请确保您还有 Microsoft.Extensions.Configuration.Json 包,其中 .AddJsonFile() 扩展位于其中.

But make sure you also have the Microsoft.Extensions.Configuration.Json package, where the .AddJsonFile() extension lives.

总而言之,您需要以下两个 NuGet 包:

In summary, you need the following two NuGet packages:

  • Microsoft.Extensions.Configuration (2.0.0)
  • Microsoft.Extensions.Configuration.Json (2.0.0)