Skip to content

Commit

Permalink
React to NuGet package pruning warnings (#46689)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Feb 10, 2025
1 parent 488ba70 commit ebc573d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/BuiltInTools/dotnet-watch/dotnet-watch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<PackageReference Include="Microsoft.Build.Tasks.Core" ExcludeAssets="runtime" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="runtime" PrivateAssets="All" />
<PackageReference Include="Microsoft.Build.Locator" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" />
<PackageReference Include="Microsoft.NET.StringTools" ExcludeAssets="runtime" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<!-- In the SDK, NuGet is already available in the MSBuild/SDK directory -->
<ExcludeAssets Condition="'$(TargetFramework)' != 'net472'">runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" ExcludeAssets="runtime">
<PackageReference Include="System.Text.Json" ExcludeAssets="runtime" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
<!-- For the net472 flavor, lock back to a System.Text.Json equal to or older than MSBuild will provide
so it doesn't have to be redistributed. -->
<VersionOverride Condition="'$(TargetFramework)' == 'net472'">$(SystemTextJsonToolsetPackageVersion)</VersionOverride>
Expand Down
1 change: 0 additions & 1 deletion src/Layout/redist/redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

<!-- Lift up dependencies of dependencies to prevent build tasks from getting pinned to older versions -->
<PackageReference Include="System.CodeDom" />
<PackageReference Include="System.Text.Encoding.CodePages" />
<PackageReference Include="System.Security.Cryptography.ProtectedData" />
<PackageReference Include="System.Resources.Extensions" />
<!-- Override to use the newest version. In source-only modes this will be a no-diff change. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="Microsoft.NET.HostModel" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="NuGet.ProjectModel" />
<PackageReference Include="NuGet.Build.Tasks.Pack" ExcludeAssets="All" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
Expand All @@ -75,6 +73,9 @@

<!-- Packages that are in-box for .NET Core, so we only need to reference them for .NET Framework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<PackageReference Include="System.Text.Json" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />

<!--
Microsoft.NET.HostModel also uses System.Reflection.Metadata. Don't move ahead of the version of System.Reflection.Metadata
that MSBuild supports with the binding redirect to ensure that both this project and Microsoft.NET.HostModel can load
Expand Down

0 comments on commit ebc573d

Please sign in to comment.