0

I have tried the solutions in multiple cases I have seen this question,

I have created a fresh template project to try and get it working simplistically but it still doesn't.

Local settings file:

{
    "IsEncrypted": false,
    "Values": {
        "AzureWebJobsStorage": "UseDevelopmentStorage=true",
        "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
        "AppConfig": "https://asdasd.io"
    }
}

Program.cs

var host = new HostBuilder()
    .ConfigureFunctionsWorkerDefaults()
    .ConfigureAppConfiguration((host, builder) =>
    {
        builder.AddJsonFile(Path.Combine(host.HostingEnvironment.ContentRootPath, "local.settings.json"),
            true,
            true);


    })
    .ConfigureAppConfiguration((host, builder) =>
    {
        var connectionString = Environment.GetEnvironmentVariable("AppConfig");
        var connectionString2= host.Configuration.GetSection("Values");
    })
    .Build();

host.Run();

The File exists in the correct debug folder so it is being copied, but I cannot for the life of me get these env vars to pull through.

This has worked fine with previous in-process versions

Hawkzey
  • 1,088
  • 1
  • 11
  • 21
  • ## UPDATE ## Turns out the plugin for azure tools within rider needed updating this was causing the issues with the config not being pulled through. – Hawkzey Aug 14 '23 at 14:31

0 Answers0