I have gone through enough article and tried different inplimentations but i coudnt get appsetting value.I am using .net core 5.0 What i have done is below.onlu NULL i am getting
My appsetting.json
{ "Logging": { "IncludeScopes": false, "LogLevel": { "Microsoft": "Information" } }, "AzureDevopsUri": "https://dev.azure.com" }
My startup.cs
public class Startup { // requires using Microsoft.Extensions.Configuration; private readonly IConfiguration Configuration; public Startup(IConfiguration configuration) { Configuration = configuration; } public void ConfigureServices(IServiceCollection services) { string azureDevopsUri = GetConfig("AzureDevopsUri"); } private string GetConfig(string configKey) { var configValue = Configuration[configKey]; // coming NULL here } }