I am trying to add an appsettings.json and followed a lot of tutorials and still can not do it.
I create appsettings.json
{
\"option1\": \"value1_f
Did you include the correct namespace?
using Microsoft.Extensions.DependencyInjection;
Also did you have a reference to?:
Microsoft.Extensions.Options.ConfigurationExtensions
In above Assembly we have:
public static IServiceCollection Configure(this IServiceCollection services, IConfiguration config) where TOptions : class;
Most probably you are using the extension method from Microsoft.Extensions.Options assembly (which is wrong)
public static IServiceCollection Configure(this IServiceCollection services, Action configureOptions) where TOptions : class;