diff --git a/src/CommandLine/Commands/DownloadCommandBase.cs b/src/CommandLine/Commands/DownloadCommandBase.cs index 80b5603d6..33afb7160 100644 --- a/src/CommandLine/Commands/DownloadCommandBase.cs +++ b/src/CommandLine/Commands/DownloadCommandBase.cs @@ -43,7 +43,7 @@ protected void CalculateEffectivePackageSaveMode() EffectivePackageSaveMode = PackageSaveModes.None; if (!string.IsNullOrEmpty(packageSaveModeValue)) { - foreach (var v in packageSaveModeValue.Split(';')) + foreach (var v in packageSaveModeValue.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) { if (v.Equals(PackageSaveModes.Nupkg.ToString(), StringComparison.OrdinalIgnoreCase)) { diff --git a/src/CommandLine/Common/ResourceHelper.cs b/src/CommandLine/Common/ResourceHelper.cs index c845053b3..47b278aac 100644 --- a/src/CommandLine/Common/ResourceHelper.cs +++ b/src/CommandLine/Common/ResourceHelper.cs @@ -51,7 +51,7 @@ public static string GetLocalizedString(Type resourceType, string resourceNames) } var builder = new StringBuilder(); - foreach (var resource in resourceNames.Split(';')) + foreach (var resource in resourceNames.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries)) { var culture = LocalizedResourceManager.GetLanguageName(); string value = resourceManager.GetString(resource + '_' + culture, CultureInfo.InvariantCulture) ??