Repository navigation
Bundle Roslyn ProjectData tasks and import them through the SDK - #56243
Merged
jasonmalinowski merged 5 commits intoSep 18, 2026
Merged
Conversation
Co-authored-by: jasonmalinowski <[email protected]>
Co-authored-by: jasonmalinowski <[email protected]>
Co-authored-by: jasonmalinowski <[email protected]>
Copilot created this pull request from a session on behalf of
jasonmalinowski
September 11, 2026 00:51
Co-authored-by: jasonmalinowski <[email protected]>
Co-authored-by: jasonmalinowski <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The bundled task runtime may be omitted, and multi-target coverage does not fully validate merged project data.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Bundles Roslyn ProjectData tasks and targets into the SDK for opt-in project-data generation without custom package references or imports.
Changes:
- Adds ProjectData dependency and centralized versioning.
- Publishes and imports ProjectData assets through the SDK layout.
- Adds single- and multi-target integration coverage.
File summaries
| File | Summary |
|---|---|
test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseProjectData.cs |
Adds ProjectData build tests. |
src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.targets |
Imports bundled ProjectData targets. |
src/Layout/redist/tools/tool_projectdata.csproj |
Defines the ProjectData bundle. |
src/Layout/redist/targets/GenerateLayout.targets |
Publishes ProjectData into the SDK layout. |
src/Layout/redist/redist.csproj |
Adds the bundle project reference. |
eng/Version.Details.xml |
Registers the dependency version and source. |
eng/Version.Details.props |
Defines ProjectData version properties. |
Directory.Packages.props |
Centrally versions the package. |
Review details
Suppressed comments (1)
test/Microsoft.NET.Build.Tests/GivenThatWeWantToUseProjectData.cs:36
- The
multiTargetcases only assert that a non-empty merged.lscacheexists. A regression in the cross-targeting merge/dispatch path could still write a valid non-empty cache from one TFM (or only the outer project) and pass this test, so the new multi-target coverage would not prove the behavior described by the test name. Add an assertion against the cache's structured contents (or another observable marker) that bothTargetFrameworksvalues are present in the merged project data.
string projectDataPath = Path.Combine(testAsset.Path, testProject.Name, $"{testProject.Name}.csproj.lscache");
File.Exists(projectDataPath).Should().Be(enabled);
if (enabled)
{
new FileInfo(projectDataPath).Length.Should().BeGreaterThan(0);
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
emaf
approved these changes
Sep 17, 2026
baronfel
approved these changes
Sep 18, 2026
baronfel
left a comment
Member
There was a problem hiding this comment.
LGTM, sorry for the delay here.
jasonmalinowski
approved these changes
Sep 18, 2026
JoeRobich
approved these changes
Sep 18, 2026
jasonmalinowski
deleted the
copilot/update-repo-to-consume-nuget-package
branch
September 18, 2026 20:43
Member
|
/backport to release/11.0.1xx |
Contributor
|
Started backporting to |
Contributor
|
@jasonmalinowski backporting to git am output$ git cherry-pick 7d46d29649c386ab78235be51220cdda736ed9b1
Auto-merging Directory.Packages.props
Auto-merging eng/Version.Details.props
CONFLICT (content): Merge conflict in eng/Version.Details.props
Auto-merging eng/Version.Details.xml
error: could not apply 7d46d29649... Bundle Roslyn ProjectData tasks and import them through the SDK (#56243)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Bundle Roslyn ProjectData tasks using a Container-style SDK layout
Using index info to reconstruct a base tree...
M eng/Version.Details.props
M eng/Version.Details.xml
Falling back to patching base and 3-way merge...
Auto-merging eng/Version.Details.props
CONFLICT (content): Merge conflict in eng/Version.Details.props
Auto-merging eng/Version.Details.xml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Bundle Roslyn ProjectData tasks using a Container-style SDK layout
Error: The process '/usr/bin/git' failed with exit code 128 |
jasonmalinowski
pushed a commit
to jasonmalinowski/sdk
that referenced
this pull request
Sep 18, 2026
…et#56243) This bundles the ProjectData/lscache tests into the SDK, so lscache files can be generated if EnableProjectDataOnBuild is enabled.
Merged
1 task done
jasonmalinowski
added a commit
that referenced
this pull request
Sep 21, 2026
This was referenced Sep 21, 2026
nagilson
added a commit
that referenced
this pull request
Sep 24, 2026
Problem: Every build leg of this codeflow fails with MSB3030: Could not copy ".packages/microsoft.net.projectdata.tasks/5.12.0-1.26473.115/ lib/netstandard2.0/Microsoft.NET.ProjectData.targets" (and .Schema.props) because it was not found. Root cause: tool_projectdata.csproj (added in #56243) copies the ProjectData targets and schema props from a hardcoded lib/netstandard2.0/ folder in the Microsoft.NET.ProjectData.Tasks package. Roslyn (flowed via dotnet/dotnet#9648) retargeted Microsoft.NET.ProjectData.Tasks from netstandard2.0 to $(NetRoslynSourceBuild) and packs these files under lib\$(TargetFramework)\. Package 5.12.0-1.26473.115 therefore ships them in lib/net10.0/ (the source-only build uses $(NetCurrent)), so the hardcoded path no longer exists. Fix: - Glob lib/*/ for the two files so the layout does not depend on the TFM Roslyn builds the task package for. - Add a build-time check that exactly the two expected files were found. Sdk.targets imports Microsoft.NET.ProjectData.targets only if it exists, so without this check a future package layout change would silently disable the feature instead of failing the build. Validation: - Reproduced the MSB3030 locally at the PR head. - With the fix, publishing tool_projectdata.csproj produces Microsoft.NET.ProjectData.{targets,Schema.props,Tasks.dll}; the targets load the task via $(MSBuildThisFileDirectory), so the layout is intact. - Overriding the package path to a missing folder hits the new error. Co-authored-by: Copilot <[email protected]> Copilot-Session: 5d7abc6b-347c-43e3-93cb-c75ee7b81f93
This was referenced Oct 6, 2026
nagilson
added a commit
that referenced
this pull request
Oct 23, 2026
…elease/11.0.1xx-to-release/11.0.2xx Conflict resolutions: - sdk.slnx, dotnet.csproj: keep Microsoft.DotNet.Cli.InternalMicrosoft (2xx, #56458); drop Microsoft.DotNet.Cli.Telemetry (removed in 1xx by #56274, replaced by Azure Monitor exporter 1.10.0). - Program.cs: combine 1xx exit-code-aware shutdown drain with 2xx internal-Microsoft detection wait. - Versions.props: take 1xx runtime version features (#56629: 8.0.33, 9.0.22, 10.0.MinorPatch+14) and restore 11.0.2xx preview band branding to match dotnet/dotnet#9512 (VersionSDKMinor 2, patch 00, preview label, empty iteration) instead of the auto-merged 1xx rtm label. Fixes for files reset to release/11.0.2xx by the flow bot: - Add Microsoft.NET.ProjectData.Tasks 5.13.0-1.26508.107 dependency (needed by #56243 from 1xx). - Disable central transitive pinning in tool_projectdata (content-only harvest) so the 2xx ProjectData package's NuGet.Versioning floor does not conflict with the 2xx NuGet band. - Update testfx dependencies to 1xx versions (MSTest 4.5.0-preview.26477.3, MTP 2.5.0-preview.26477.3) needed by 1xx HotReload.Client tests (#56609). Co-authored-by: Copilot <[email protected]>
This was referenced Oct 26, 2026
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.
Bundle Roslyn’s
Microsoft.NET.ProjectData.Tasksand import its targets through the SDK so projects can generate project data without adding a package reference or custom import. This integrates the package introduced in dotnet/dotnet#9362.The tasks, targets, schema, and runtime dependencies are shipped together in the SDK’s
ProjectDatadirectory. Generation during normal builds remains opt-in throughEnableProjectDataOnBuild, with integration coverage for single- and multi-targeted projects.