-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[tasks] [net472] Add ProjectReferences to JsonToItemsTaskFactory #58825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
We will need to backport this to 6.0, I think. |
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<!!0> System.Text.Json.JsonSerializer.DeserializeAsync(System.IO.Stream, System.Text.Json.JsonSerializerOptions, System.Threading.CancellationToken)'. at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.<GetJsonAsync>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.<ExecuteInstantiatedTask>d__26.MoveNext() ``` from `C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rc.1.21451.13\Sdk\RuntimeComponentManifest.targets`
|
@ViktorHofer @steveisok @akoeplinger Should I make some I'm concerned a |
5bcba3d to
3b31901
Compare
0aae9f3 to
b919de0
Compare
|
/backport to release/6.0 |
|
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1219721635 |
| <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" PrivateAssets="all" /> | ||
| <PackageReference Include="System.Text.Json" Version="5.0.0" PrivateAssets="all" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version numbers should not be hardcoded here
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:
from
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rc.1.21451.13\Sdk\RuntimeComponentManifest.targetsUltimately this is because msbuild has a binding redirect here:
https://github.com/dotnet/msbuild/blob/1a1f20e4980fd1b02426b62220480f86e6ec5abf/src/MSBuild/app.config#L97
that points to an older version of System.Threading.Tasks.Extensions than what they end up building with, but that happens to coincide with the one that the JsonToItemsTaskFactory task bundles.
Related PR dotnet/msbuild#6830