Skip to content

Commit b1adb84

Browse files
authored
React to NuGet package pruning warnings (#60297)
Contributes to dotnet/sdk#46642 NuGet added a new feature that automatically prunes package and project references that are provided by the shared framework that is targeted. Resolve the 3 warnings that got emitted when source-building the repository.
1 parent d498fbc commit b1adb84

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<Reference Include="Microsoft.Extensions.Caching.Memory" />
2323
<Reference Include="Microsoft.Extensions.Logging" />
2424
<!-- Required for S.T.J source generation -->
25-
<Reference Include="System.Text.Json" PrivateAssets="All" />
25+
<Reference Include="System.Text.Json" PrivateAssets="All" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
2626

2727
<Compile Include="$(SharedSourceRoot)ValueStopwatch\*.cs" />
2828
<Compile Include="$(SharedSourceRoot)LinkerFlags.cs" LinkBase="Shared" />

src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<ItemGroup>
3030
<Reference Include="System.IdentityModel.Tokens.Jwt" />
31-
<Reference Include="System.Text.Json" />
31+
<Reference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3232
<Reference Include="Microsoft.Extensions.Configuration.Abstractions" />
3333
<Reference Include="Microsoft.Extensions.Configuration" />
3434
<Reference Include="Microsoft.Extensions.Configuration.Binder" />

src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<ItemGroup>
3131
<Reference Include="Newtonsoft.Json" />
32-
<Reference Include="System.Text.Json" />
32+
<Reference Include="System.Text.Json" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3333
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" />
3434
</ItemGroup>
3535

0 commit comments

Comments
 (0)