Skip to content

Commit

Permalink
Refactor wasmappbuilder's System.Text.Json reference to use a version…
Browse files Browse the repository at this point in the history
…s.props property (#70582)

* Refactor wasmappbuilder's System.Text.Json version reference to use a versions.props property

* Update per code review and refactor MetadataLoadContext version
  • Loading branch information
MichaelSimons authored Aug 6, 2022
1 parent 7c06020 commit 667c170
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<SystemMemoryVersion>4.5.4</SystemMemoryVersion>
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
<SystemReflectionMetadataVersion>6.0.0</SystemReflectionMetadataVersion>
<SystemReflectionMetadataLoadContextVersion>4.7.1</SystemReflectionMetadataLoadContextVersion>
<SystemReflectionEmitVersion>4.7.0</SystemReflectionEmitVersion>
<SystemReflectionEmitILGenerationVersion>4.7.0</SystemReflectionEmitILGenerationVersion>
<SystemReflectionEmitLightweightVersion>4.7.0</SystemReflectionEmitLightweightVersion>
Expand Down
8 changes: 6 additions & 2 deletions src/tasks/WasmAppBuilder/WasmAppBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@

<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildTasksCoreVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="4.7.1" />
<PackageReference Include="System.Text.Json" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />

<!-- When we requested a version that is newer than what comes with Visual Studio version of msbuild, it causes problems with
running the task from inside VS. Therefore, we are using the moving version only for source-build. -->
<PackageReference Include="System.Text.Json" Condition="'$(DotNetBuildFromSource)' != 'true'" Version="6.0.0" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Condition="'$(DotNetBuildFromSource)' == 'true'" Version="$(SystemTextJsonVersion)" PrivateAssets="all" />
</ItemGroup>

<Target Name="GetFilesToPackage" Returns="@(FilesToPackage)">
Expand Down

0 comments on commit 667c170

Please sign in to comment.