From 9a90d3b1303a19224b5da0a608cea5a61034ea8a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 09:43:51 -0700 Subject: [PATCH] [release/6.0] [tasks] [net472] Add ProjectReferences to JsonToItemsTaskFactory (#58917) * [tasks] [net472] Add ProjectReferences to JsonToItemsTaskFactory Reference the same versions of System.Threding.Tasks.Extensions and System.Text.Json that MSBuild in Visual Studio 2022 uses. Fixes build errors on maui-ios (and possibly blazorwasm) targets on Windows like: ``` System.MissingMethodException: Method not found: 'System.Threading.Tasks.ValueTask`1 System.Text.Json.JsonSerializer.DeserializeAsync(System.IO.Stream, System.Text.Json.JsonSerializerOptions, System.Threading.CancellationToken)'. at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.d__24.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine) at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.GetJsonAsync(String jsonFilePath, FileStream file) at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.TryGetJson(String jsonFilePath, JsonModelRoot& json) at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() ``` from `C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rc.1.21451.13\Sdk\RuntimeComponentManifest.targets` * assembly version is 4.2.0.1, but nuget version is 4.5.4, apparently Co-authored-by: Aleksey Kliger --- src/tasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.csproj b/src/tasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.csproj index d6df214..f68810f 100644 --- a/src/tasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.csproj +++ b/src/tasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.csproj @@ -15,6 +15,12 @@ + + + + + + -- 2.7.4