Skip to content

Commit

Permalink
fix appsettings.serects.json
Browse files Browse the repository at this point in the history
  • Loading branch information
rwecho committed Dec 13, 2023
1 parent 6475b94 commit 73e1f57
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/V2ex.Blazor/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ private static void ConfigureConfiguration(MauiAppBuilder builder)
{
var assembly = typeof(App).GetTypeInfo().Assembly;
builder.Configuration.AddJsonFile(new EmbeddedFileProvider(assembly), "appsettings.json", optional: false, false);
builder.Configuration.AddJsonFile(new EmbeddedFileProvider(assembly), "appsettings.secrets.json", optional: false, false);


//check if there is a appsettings.secrets.json file
if (assembly.GetManifestResourceNames().Contains("appsettings.secrets.json"))
{
builder.Configuration.AddJsonFile(new EmbeddedFileProvider(assembly), "appsettings.secrets.json", optional: false, false);
}

}
}

0 comments on commit 73e1f57

Please sign in to comment.