From 5f864ba420c6c95b7b12a047fbbc0c871f7cdd2c Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 8 Jan 2019 16:12:38 +0000 Subject: [PATCH] Fixes dnx ef gen commands --- src/Yavsc/Startup/Startup.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Yavsc/Startup/Startup.cs b/src/Yavsc/Startup/Startup.cs index f97de52c..4c4f4b00 100755 --- a/src/Yavsc/Startup/Startup.cs +++ b/src/Yavsc/Startup/Startup.cs @@ -83,9 +83,13 @@ namespace Yavsc var googleClientFile = Configuration["Authentication:Google:GoogleWebClientJson"]; var googleServiceAccountJsonFile = Configuration["Authentication:Google:GoogleServiceAccountJson"]; - GoogleWebClientConfiguration = new ConfigurationBuilder().AddJsonFile(googleClientFile).Build(); - var safile = new FileInfo(googleServiceAccountJsonFile); - GServiceAccount = JsonConvert.DeserializeObject(safile.OpenText().ReadToEnd()); + if (googleClientFile!=null) + GoogleWebClientConfiguration = new ConfigurationBuilder().AddJsonFile(googleClientFile).Build(); + if (googleServiceAccountJsonFile!=null) + { + var safile = new FileInfo(googleServiceAccountJsonFile); + GServiceAccount = JsonConvert.DeserializeObject(safile.OpenText().ReadToEnd()); + } } public static string ConnectionString { get; set; }