Switch Components E2E manifest generation to DataContractJsonSerializer#66891
Open
Copilot wants to merge 1 commit into
Open
Switch Components E2E manifest generation to DataContractJsonSerializer#66891Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
…JsonSerializer Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
javiercn
May 28, 2026 14:43
View session
1 task
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Components E2E manifest generation MSBuild task to use DataContractJsonSerializer (matching the approach used in Mvc.Testing.Tasks) instead of System.Text.Json, while preserving the manifest’s JSON shape and dictionary/object formatting expected by existing consumers.
Changes:
- Switched
GenerateE2EManifestto write JSON viaDataContractJsonSerializer+JsonReaderWriterFactory(UTF-8, indented, simple dictionary format). - Annotated the task-side manifest model types with
[DataContract]/[DataMember(Name = ...)]to keep property names stable. - Removed the task project’s
System.Text.Jsonreference and deleted the now-obsolete source-generation context file.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Components/Testing/tasks/Microsoft.AspNetCore.Components.Testing.Tasks.csproj | Drops the explicit System.Text.Json reference now that task-side serialization no longer depends on it. |
| src/Components/Testing/tasks/GenerateE2EManifest.cs | Replaces System.Text.Json serialization with DataContractJsonSerializer output written directly to the manifest file stream. |
| src/Components/Testing/tasks/E2EManifestModel.cs | Adds DataContract/DataMember attributes to preserve JSON property names under DataContractJsonSerializer. |
| src/Components/Testing/tasks/E2EManifestJsonContext.cs | Removes the task-side System.Text.Json source-generation context (no longer used). |
pavelsavara
approved these changes
May 28, 2026
Open
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch Components E2E manifest generation to DataContractJsonSerializer
Align Components.Testing.Tasks manifest serialization with MVC.Testing.Tasks by replacing
System.Text.Jsonusage withDataContractJsonSerializerwhile preserving manifest shape and dictionary formatting.Description
Serialization pipeline
GenerateE2EManifestnow writes manifest JSON viaDataContractJsonSerializer+JsonReaderWriterFactory(UTF-8, indented, simple dictionary format).System.Text.Jsoncontext usage from task-side manifest generation.Manifest model contract
[DataContract]/[DataMember(Name = ...)]to task manifest models so emitted JSON property names remain stable (apps,executable,arguments,workingDirectory,publicUrl,environmentVariables).Task project dependencies
System.Text.Jsonreference fromMicrosoft.AspNetCore.Components.Testing.Tasks.csproj.tasks/E2EManifestJsonContext.cs.