diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs index 86ad1f5013..29c9bf8938 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs @@ -248,7 +248,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency } catch (Exception ex) when (ex is not CliUsageException) { - Console.WriteLine("Error occured while getting the latest version from {0} : {1}", url, ex.Message); + Console.WriteLine("Error occurred while getting the latest version from {0} : {1}", url, ex.Message); return null; } } @@ -351,10 +351,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency } await EnsureAbpIoSuccessfulResponseAsync(responseMessage); - var resultAsBytes = await responseMessage.Content.ReadAsByteArrayAsync(); - responseMessage.Dispose(); - - return resultAsBytes; + return await responseMessage.Content.ReadAsByteArrayAsync(); } catch (Exception ex) { @@ -369,7 +366,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency throw; } - Console.WriteLine("Error occured while downloading source-code from {0} : {1}{2}{3}", url, + Console.WriteLine("Error occurred while downloading source-code from {0} : {1}{2}{3}", url, responseMessage?.ToString(), Environment.NewLine, ex.Message); throw; } diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs index 85193d3f90..a5730019de 100644 --- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs +++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs @@ -2,7 +2,6 @@ using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; -using Microsoft.Extensions.Options; using Shouldly; using Volo.Abp.Cli.ProjectBuilding; using Volo.Abp.Json.SystemTextJson;