private static void ConfigureServices(IServiceCollection serviceCollection) { var currentDir = ProjectPath.GetApplicationRoot(); // build configuration var configuration = new ConfigurationBuilder() .SetBasePath(currentDir) .AddJsonFile("appsettings.json", false) .Build(); serviceCollection.AddOptions(); serviceCollection.Configure <WebJobSettings>(configuration.GetSection("WebJobSettings")); serviceCollection.Configure <QueueSettings>(configuration.GetSection("QueueSettings")); // add app serviceCollection.AddTransient <WebJob>(); }