diff --git a/src/dotnet-grpc/Commands/CommandBase.cs b/src/dotnet-grpc/Commands/CommandBase.cs index d0a400cfd..ce56115da 100644 --- a/src/dotnet-grpc/Commands/CommandBase.cs +++ b/src/dotnet-grpc/Commands/CommandBase.cs @@ -127,7 +127,7 @@ public async Task EnsureNugetPackagesAsync(Services services) }*/ try { - using var packageVersionStream = await _httpClient.GetStreamAsync(PackageVersionUrl); + await using var packageVersionStream = await _httpClient.GetStreamAsync(PackageVersionUrl); using var packageVersionDocument = await JsonDocument.ParseAsync(packageVersionStream); var packageVersionsElement = packageVersionDocument.RootElement.GetProperty("Packages"); var packageVersionsDictionary = new Dictionary(StringComparer.OrdinalIgnoreCase);