How do I Use ConfigurationBuilder in .net core 3.1 Winforms?
You extension method SetBasePath is defined in Config.FileExtensions
.
Can you check if you are missing a reference to:
Microsoft.Extensions.Configuration.FileExtensions
package.
For resolving AddJsonFile, need to add a reference to the Microsoft.Extensions.Configuration.Json
package.
I tried the same code that you have posted. I could able to compile and run the app after adding the following NuGet packages.
Microsoft.Extensions.Configuration (Version 3.1.0)
Microsoft.Extensions.Configuration.Json (Version 3.1.0)
Most probably you are missing these packages in your environment.