Skip to content

Remove JsonToItemsTaskFactory - #134221

Draft
rainersigwald wants to merge 3 commits into
dotnet:mainfrom
rainersigwald:raines-json-task-factory-removal
Draft

rainersigwald wants to merge 3 commits into
dotnet:mainfrom
rainersigwald:raines-json-task-factory-removal

Conversation

@rainersigwald

Copy link
Copy Markdown
Member

When running in multithreaded mode, MSBuild does not support custom task factories. JsonToItemsTaskFactory is used for two scoped cases that can be replaced by small tasks with explicit inputs, so I've done so here.

rainersigwald and others added 3 commits September 11, 2026 17:49
Keep JsonToItemsTaskFactory behavior unchanged while moving parsing and item conversion into reusable helpers.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Register the fixed-shape readers directly and remove the custom task factory unsupported by multithreaded MSBuild.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cover output compatibility, invalid manifests, and legacy and multithreaded MSBuild hosting.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The replacement preserves the scoped outputs and includes focused coverage for both legacy and multithreaded MSBuild execution.

Pull request overview

Replaces the unsupported custom JSON task factory with fixed compiled MSBuild tasks for WASM and Mono component manifests.

Changes:

  • Adds shared JSON parsing and explicit task outputs.
  • Updates WASM/mobile registrations to use compiled tasks.
  • Adds legacy and multithreaded MSBuild coverage.
File summaries
File Description
src/tasks/MonoTargetsTasks/JsonToItemsTaskFactory/README.md Removes obsolete factory documentation.
src/tasks/MonoTargetsTasks/JsonToItemsTaskFactory/JsonToItemsTaskFactory.cs Removes the custom task factory.
src/tasks/MonoTargetsTasks/JsonToItems/README.md Documents the replacement tasks.
src/tasks/MonoTargetsTasks/JsonToItems/JsonToItemsTasks.cs Defines fixed compiled tasks.
src/tasks/MonoTargetsTasks/JsonToItems/JsonToItemsReader.cs Implements shared manifest parsing.
src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj References the task project.
src/mono/wasm/Wasm.Build.Tests/JsonManifestReaderTests.cs Tests parsing and MSBuild modes.
src/mono/wasm/build/WasmApp.Common.targets Registers the compiled WASM task.
src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/Sdk/MonoTargetsTasks.props Registers the compiled component task.
src/mono/nuget/Microsoft.NET.Runtime.MonoTargets.Sdk/README.md Documents component-manifest support.
src/mono/msbuild/common/CommonMobileBuild.props Updates mobile task registration.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 0
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants