File tree Expand file tree Collapse file tree
app/Wissance.Zerial/Wissance.Zerial.Desktop Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments