Setting Base Path using ConfigurationBuilder
I was able to solve the issue. If you have not yet solved it, try the following in the project.json. Add the following:
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-*","Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final"
and it should work
Not sure if anyone still runs into this issue but I was able to address this in a dotnetcore console project (netcoreapp2.0) via:
dotnet add package Microsoft.Extensions.Configuration.Json
Try adding the following in your .csproj
file:
<ItemGroup> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" /></ItemGroup>