I need to set a Azure Functions app's base directory to the azurewebjobsscriptroot
like below, but got exception
var config = new ConfigurationBuilder()
.SetBasePath("%HOME%\site\wwwroot") //error
.AddJsonFile("Settings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
System.ArgumentException : The path must be absolute. Parameter name: root at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root,ExclusionFilters filters) at Microsoft.Extensions.Configuration.FileConfigurationExtensions.SetBasePath(IConfigurationBuilder builder,String basePath)
Azure function 2.x
VS 2017
https://docs.microsoft.com/en-us/azure/azure-functions/functions-app-settings#azurewebjobsscriptroot