App Settings in Client-Side Blazor
December 17, 2019 in BlazorI’ve been spoiled by Asp.Net and expect app settings to just work, but there is no easily configured app settings story for client-side Blazor yet. What I’m looking for is the ability to set some settings on a per-environment (dev/test/beta/prod) through Azure App Service Application Settings. The goal is one build artifact that moves from environment to environment with zero changes.
If you host the Blazor app as static files you’d need to change the app settings file for each different environment. So, I’ve gone with Asp.Net Core Web Hosted. I’ve named the app AppSettingsExample, so in the solution we have AppSettingsExample.Client (the WASM app), AppSettingsExample.Server (the host app), and AppSettingExample.Shared (code that is shared between the Client and Server)