Skip to content

Commit

Permalink
remove getawaiter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusu-Allehu committed Oct 15, 2024
1 parent 3b03121 commit 741ff35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/NuGet.Core/NuGet.ProjectModel/CacheFileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public static CacheFile Read(Stream stream, ILogger log, string path)

try
{
var cacheFile = JsonSerializer.DeserializeAsync<CacheFile>(utf8Json: stream, SerializerOptions).GetAwaiter().GetResult();
var cacheFile = JsonSerializer.Deserialize<CacheFile>(utf8Json: stream, SerializerOptions);
return cacheFile;
}
catch (Exception ex) when (ex is ArgumentNullException || ex is JsonException || ex is NotSupportedException)
Expand Down
4 changes: 4 additions & 0 deletions src/NuGet.Core/NuGet.ProjectModel/NuGet.ProjectModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@
<ItemGroup>
<InternalsVisibleTo Include="NuGet.ProjectModel.Test" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" />
</ItemGroup>
</Project>

0 comments on commit 741ff35

Please sign in to comment.