diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackagePreviewSwitcher.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackagePreviewSwitcher.cs index 6addbd8bb8..9dfacf5431 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackagePreviewSwitcher.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/PackagePreviewSwitcher.cs @@ -273,7 +273,15 @@ public class PackagePreviewSwitcher : ITransientDependency // (source registration / regular PackageReference updates below must still // proceed for every solution/project) - just skip the --include pass. Logger.LogWarning(ex, "Could not resolve the latest Volo.Abp.Core nightly version; --include files will be skipped for this run."); - latestVersionFromMyGet = null; + return (includeFiles, excludedPackages, null); + } + + if (latestVersionFromMyGet.IsNullOrWhiteSpace()) + { + // No exception was thrown, but MyGet simply has no version for this package yet + // (e.g. not indexed there) - warn so users aren't left wondering why --include did nothing. + Logger.LogWarning("Could not resolve the latest Volo.Abp.Core nightly version; --include files will be skipped for this run."); + return (includeFiles, excludedPackages, null); } return (includeFiles, excludedPackages, latestVersionFromMyGet); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs index 6500674799..f9aedb29b9 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/VoloNugetPackagesVersionUpdater.cs @@ -408,7 +408,7 @@ public class VoloNugetPackagesVersionUpdater : ITransientDependency { using (var fs = File.Open(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None)) { - using (var sr = new StreamReader(fs, Encoding.Default, true)) + using (var sr = new StreamReader(fs, DefaultEncoding, true)) { var fileContent = await sr.ReadToEndAsync();