From 336de6a7db6eebc056c09d170f9d1a25013a06ba Mon Sep 17 00:00:00 2001 From: Davide Giacometti Date: Tue, 10 May 2022 18:15:41 +0200 Subject: [PATCH] [PTRun][TimeZone]Removed fxcop (#18146) --- .../Helper/JsonHelper.cs | 3 ++- .../Microsoft.PowerToys.Run.Plugin.TimeZone.csproj | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Helper/JsonHelper.cs b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Helper/JsonHelper.cs index 5f657d737a4..2d5d8491a48 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Helper/JsonHelper.cs +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Helper/JsonHelper.cs @@ -38,7 +38,8 @@ internal static TimeZoneList ReadAllPossibleTimeZones() using var stream = assembly.GetManifestResourceStream(resourceName); if (stream is null) { - throw new Exception("stream is null"); + Log.Error("Stream is null", typeof(JsonHelper)); + return new TimeZoneList(); } using var reader = new StreamReader(stream); diff --git a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Microsoft.PowerToys.Run.Plugin.TimeZone.csproj b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Microsoft.PowerToys.Run.Plugin.TimeZone.csproj index e2b2dd9695b..42b0844942f 100644 --- a/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Microsoft.PowerToys.Run.Plugin.TimeZone.csproj +++ b/src/modules/launcher/Plugins/Microsoft.PowerToys.Run.Plugin.TimeZone/Microsoft.PowerToys.Run.Plugin.TimeZone.csproj @@ -53,11 +53,11 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive