Skip to content

Commit e8696b9

Browse files
committed
1 more attempt
1 parent af9b071 commit e8696b9

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

app/Wissance.Zerial/Wissance.Zerial.Desktop/App.axaml.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@ public class App : Application
1414
static App()
1515
{
1616
// appsettings is optional due to we don't actually know install dir i.e. in Snap, but we could execute from any working dir
17-
IConfigurationBuilder builder = new ConfigurationBuilder()
18-
.SetBasePath(Directory.GetCurrentDirectory())
19-
.AddJsonFile(AppSettingsFile, optional: true, reloadOnChange: true);
20-
17+
IConfigurationBuilder builder;
18+
try
19+
{
20+
builder = new ConfigurationBuilder()
21+
.SetBasePath(Directory.GetCurrentDirectory())
22+
.AddJsonFile(AppSettingsFile, optional: true, reloadOnChange: false);
23+
}
24+
catch (Exception e)
25+
{
26+
builder = new ConfigurationBuilder();
27+
}
28+
2129
Configuration = builder.Build();
2230

2331
ServiceCollection services = new ServiceCollection();

0 commit comments

Comments
 (0)