Skip to content

Commit ccc70ac

Browse files
authored
React to NuGet package pruning warnings
Contributes to dotnet/sdk#46829 NuGet added a new feature that automatically prunes package and project references that are provided by the shared framework that is targeted. Resolve warnings that get emitted when building non-source-only.
1 parent 9c410aa commit ccc70ac

File tree

10 files changed

+5
-14
lines changed

10 files changed

+5
-14
lines changed

src/Azure/AzureAppServices.HostingStartup/src/Microsoft.AspNetCore.AzureAppServices.HostingStartup.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
<ItemGroup>
1414
<Reference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" />
1515
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
16-
<Reference Include="System.Text.Json" />
1716
</ItemGroup>
1817

1918
<ItemGroup>

src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<ItemGroup>
2222
<Reference Include="Microsoft.AspNetCore" />
2323
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
24-
<Reference Include="System.Text.Json" />
2524

2625
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Templating" PrivateAssets="All" Version="$(MicrosoftDotNetBuildTasksTemplatingVersion)" IsImplicitlyDefined="true" AllowExplicitReference="true" />
2726
</ItemGroup>

src/Features/JsonPatch/src/Microsoft.AspNetCore.JsonPatch.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<Reference Include="Microsoft.CSharp" />
25+
<Reference Include="Microsoft.CSharp" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
2626
<Reference Include="Newtonsoft.Json" />
2727
</ItemGroup>
2828

src/Logging.AzureAppServices/src/Microsoft.Extensions.Logging.AzureAppServices.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Reference Include="Microsoft.Extensions.Logging.Abstractions" />
1919
<Reference Include="Microsoft.Extensions.Logging.Configuration" />
2020
<Reference Include="Microsoft.Extensions.Logging" />
21-
<Reference Include="System.ValueTuple" />
21+
<Reference Include="System.ValueTuple" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
2222
</ItemGroup>
2323

2424
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetFxTargetFramework)' OR '$(MSBuildRestoreSessionId)' == ''">

src/Servers/IIS/IntegrationTesting.IIS/src/Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@
7070

7171
<Reference Include="Microsoft.NETCore.Windows.ApiSets" />
7272
<Reference Include="Microsoft.Web.Administration" />
73-
<Reference Include="System.Net.Http" />
74-
<Reference Include="System.Security.Cryptography.X509Certificates" />
75-
<Reference Include="System.Security.Principal.Windows" />
7673
<Reference Include="System.ServiceProcess.ServiceController" />
7774
</ItemGroup>
7875

src/SignalR/clients/csharp/Client.Core/src/Microsoft.AspNetCore.SignalR.Client.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.Json" />
3434
<Reference Include="Microsoft.Extensions.DependencyInjection" />
3535
<Reference Include="Microsoft.Extensions.Logging" />
36-
<Reference Include="System.Threading.Channels" />
36+
<Reference Include="System.Threading.Channels" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3737
</ItemGroup>
3838

3939
<ItemGroup Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'">

src/Testing/src/Microsoft.AspNetCore.InternalTesting.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<Reference Include="Microsoft.Extensions.Logging" />
2929
<Reference Include="Serilog.Extensions.Logging" />
3030
<Reference Include="Serilog.Sinks.File" />
31-
<Reference Include="System.ValueTuple" />
31+
<Reference Include="System.ValueTuple" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
3232

3333
<!--
3434
This intentionally does not reference 'xunit', 'xunit.core', or any runner packages.

src/Tools/GetDocumentInsider/src/GetDocument.Insider.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<Reference Include="Microsoft.Extensions.Hosting.Abstractions" />
2020
</ItemGroup>
2121

22-
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
22+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
2323
<Reference Include="System.Diagnostics.DiagnosticSource" />
2424
</ItemGroup>
2525

src/Tools/Microsoft.dotnet-openapi/src/Microsoft.dotnet-openapi.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
<ItemGroup>
1818
<Reference Include="Microsoft.Build" ExcludeAssets="runtime" />
1919
<Reference Include="Microsoft.Build.Locator" />
20-
<Reference Include="System.Private.Uri" />
21-
<Reference Include="System.Text.Json" />
2220
</ItemGroup>
2321

2422
<ItemGroup>

src/Tools/dotnet-sql-cache/src/dotnet-sql-cache.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
<ItemGroup>
1717
<Reference Include="Microsoft.Data.SqlClient" />
1818
<Reference Include="Azure.Identity" />
19-
<Reference Include="System.Private.Uri" />
2019
<Reference Include="System.Runtime.Caching" />
21-
<Reference Include="System.Text.Json" />
2220
</ItemGroup>
2321

2422
</Project>

0 commit comments

Comments
 (0)