Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Having difficulties including appsettings.override.json file in Blazor WebAssembly

$
0
0

Program.cs of Blazor Client

var builder = WebAssemblyHostBuilder.CreateDefault(args);builder.Configuration.AddJsonFile("appsettings.override.json", optional: false, reloadOnChange: false);builder.RootComponents.Add<App>("#app");builder.RootComponents.Add<HeadOutlet>("head::after");await builder.Build().RunAsync();

I am encountering the following error in browser console.

enter image description here

What is the correct way to add custom appsettings.override.json file in blazor webassembly project?

I tried:

builder.Configuration.AddJsonFile("appsettings.override.json", optional: false, reloadOnChange: false);   builder.Configuration.AddJsonFile("wwwroot/appsettings.override.json", optional: false, reloadOnChange: false);

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>