Skip to content

Commit

Permalink
Make SystemTextJsonToolsetVersion 8.0.4
Browse files Browse the repository at this point in the history
We cannot count on VS and MSBuild updating by the time 9.0 ships GA.

Fix WASM projects which only target .NET by referencing the LKG and dropping all assets.

For Microsoft.NET.HostModel and other build tasks, keep them on the version we can garuntee is present in VS.  NoWarn the Audit warnings here.  This is safe because we can ensure one of two things.
1. The package is non-shipping and customers won't see the warning and the referencing repo in the product will ensure an update or exclusion of the dependency. (HostModel)
2. The project excludes the reference entirely as making it PrivateAssets (not in package) and ExcludeAssets=runtime  (no possibility of using runtime).
  • Loading branch information
ericstj committed Oct 15, 2024
1 parent 740eff6 commit 880fa5d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<runtimenativeSystemIOPortsVersion>9.0.0-rtm.24503.8</runtimenativeSystemIOPortsVersion>
<!-- Keep toolset versions in sync with dotnet/msbuild and dotnet/sdk -->
<SystemCollectionsImmutableToolsetVersion>8.0.0</SystemCollectionsImmutableToolsetVersion>
<SystemTextJsonToolsetVersion>8.0.5</SystemTextJsonToolsetVersion>
<SystemTextJsonToolsetVersion>8.0.4</SystemTextJsonToolsetVersion>
<SystemReflectionMetadataToolsetVersion>8.0.0</SystemReflectionMetadataToolsetVersion>
<SystemReflectionMetadataLoadContextToolsetVersion>8.0.0</SystemReflectionMetadataLoadContextToolsetVersion>
<!-- Runtime-Assets dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
<!-- SDK pins this to a lower version https://github.com/dotnet/sdk/issues/43325 -->
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataToolsetVersion)" />
<!-- The SDK distributes the live version of Json we can't reference that https://github.com/dotnet/runtime/issues/108262 -->
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" />
<!-- We suppress all audit warnings for this reference. This package is non-shipping, the only consumer is the SDK which
will provide the correct version or depend on MSBuild to provide it -->
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" NoWarn="NU1901;NU1902;NU1903;NU1904" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Playwright" Version="1.21.0" />
<ProjectReference Include="$(RepoRoot)src\tasks\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" />
<!-- Update the version provided by Microsoft.Playwright but drop it in favor of framework copy-->
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" PrivateAssets="All" ExcludeAssets="All" />
<Compile Include="$(BrowserProjectRoot)debugger\DebuggerTestSuite\BrowserLocator.cs" />

<None Include="$(BrowserProjectRoot)\test-main.js" CopyToOutputDirectory="PreserveNewest" />
Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/symbolicator/WasmSymbolicator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.XHarness.Common" Version="$(MicrosoftDotNetXHarnessTestRunnersCommonVersion)" />
<!-- Update and drop package assets from Json, we'll use the framework version -->
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" PrivateAssets="All" ExcludeAssets="All" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" PrivateAssets="All" ExcludeAssets="All" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/tasks/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net462'))">
<!-- These assemblies and their dependencies are made available by MSBuild on .NET Framework -->
<!-- These assemblies and their dependencies are made available by MSBuild on .NET Framework, we only reference for compilation -->
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataToolsetVersion)" ExcludeAssets="Runtime" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" ExcludeAssets="Runtime" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonToolsetVersion)" ExcludeAssets="Runtime" PrivateAssets="All" NoWarn="NU1901;NU1902;NU1903;NU1904" />
</ItemGroup>

<Import Project="$(RepositoryEngineeringDir)PackageDownloadAndReference.targets" />
Expand Down

0 comments on commit 880fa5d

Please sign in to comment.