diff --git a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs index 00dd9b68e6b1..3966bf59f961 100644 --- a/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs +++ b/src/Tools/dotnet-user-secrets/src/Internal/SetCommand.cs @@ -61,7 +61,7 @@ public sealed class FromStdInStrategy : ICommand public void Execute(CommandContext context) { // parses stdin with the same parser that Microsoft.Extensions.Configuration.Json would use - var provider = new ReadableJsonConfigurationProvider(); + using var provider = new ReadableJsonConfigurationProvider(); using (var stream = new MemoryStream()) { using (var writer = new StreamWriter(stream, Encoding.Unicode, 1024, true))