Skip to content

[release/10.0.1xx] [build] Fix ConfigureLocalWorkload for .NET 10.0.400 SDK#11579

Draft
jonathanpeppers wants to merge 3 commits into
release/10.0.1xxfrom
jonathanpeppers/miniature-broccoli
Draft

[release/10.0.1xx] [build] Fix ConfigureLocalWorkload for .NET 10.0.400 SDK#11579
jonathanpeppers wants to merge 3 commits into
release/10.0.1xxfrom
jonathanpeppers/miniature-broccoli

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

@jonathanpeppers jonathanpeppers commented Jun 4, 2026

PRs targeting release/10.0.1xx were failing in two CI steps after PR #11550 bumped the SDK to 10.0.400-preview.0.26281.104. This PR fixes both.

1. ConfigureLocalWorkload target

Symptom (example failing builds: 14272822, 14286661):

Workload installation failed: Workload ID android-deps is not recognized.

Root cause: SdkDirectoryWorkloadManifestProvider discovers loose manifests under <root>/<SdkFeatureBand.ToString()>/. For SDK 10.0.400-preview.0.26281.104 that string is 10.0.400-preview.0, not 10.0.400. The synthetic android-deps workload manifest was being written to bin/Release/lib/sdk-manifests/10.0.400/android.deps.workload/..., so the SDK's resolver never found it. Previous stable / -rtm / -dev SDKs returned just 10.0.400 from SdkFeatureBand.ToString(), which is why this worked before #11550.

Fix in build-tools/create-packs/ConfigureLocalWorkload.targets:

  • Place the synthetic android.deps.workload folder under $(DotNetPreviewVersionBand) (e.g. 10.0.400-preview.0) instead of $(DotNetSdkManifestsFolder) (10.0.400). DotNetPreviewVersionBand already matches SdkFeatureBand.ToString() for both stable and preview SDKs.
  • Also (defensive): run dotnet workload config --update-mode manifests before the install to ensure the local SDK is in loose-manifest mode, since workload-set mode is now the default in 10.0.400.

_LocalAndroidManifestFolder is intentionally left under $(DotNetSdkManifestsFolder) — it is only the packaging source for the workload-manifest NuGet, not a path the SDK reads at install time.

2. "Ensure no modified/untracked files" dirty-tree check

Symptom (example failing build: 14283875): the dirty-tree check reported build-tools/banned-apis/banned-apis.targets and src/Mono.Android/Mono.Android.csproj as modified.

Root cause: dependabot bumps (#11562, #11563) stored these files with CRLF directly in the git index. .gitattributes declares *.targets and *.csproj as eol=crlf, which means the index should hold LF and the smudge filter writes CRLF to the working tree on checkout. When CRLF is stored in the index, any cross-platform tool that touches the file causes git status to report changes.

Fix: ran git add --renormalize on just those two files. The diff is whitespace-only (verifiable with git diff -w); content is unchanged.

….400 SDK

PR #11550 bumped the SDK to 10.0.400-preview.0.26281.104, where
workload-set mode is the default. As a result,
`dotnet workload install android-deps --skip-manifest-update` no longer
reliably enumerates loose manifests from
`DOTNETSDK_WORKLOAD_MANIFEST_ROOTS`, and the synthetic `android-deps`
workload written by `InstallManifestAndDependencies` is not recognized:

    Workload installation failed: Workload ID android-deps is not recognized.

Switch the local SDK to manifest-mode before the workload install via
`dotnet workload config --update-mode manifests` so loose manifests are
honored again.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 4, 2026 16:31
@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses CI failures on release/10.0.1xx when running ConfigureLocalWorkload, caused by .NET 10.0.400 SDK defaulting to workload-set mode where the synthetic android-deps workload (from loose manifests under DOTNETSDK_WORKLOAD_MANIFEST_ROOTS) is not reliably discovered. The change opts the CLI back into loose-manifest update mode prior to installing android-deps.

Changes:

  • Adds dotnet workload config --update-mode manifests before installing the synthetic android-deps workload.
  • Keeps the existing dotnet workload install android-deps ... --skip-manifest-update flow intact, relying on DOTNETSDK_WORKLOAD_MANIFEST_ROOTS.

Comment thread build-tools/create-packs/ConfigureLocalWorkload.targets
`build-tools/banned-apis/banned-apis.targets` and
`src/Mono.Android/Mono.Android.csproj` were committed by dependabot
with CRLF stored directly in the index, bypassing git's clean
filter. `.gitattributes` declares `*.targets` and `*.csproj` as
`eol=crlf`, which means the index should store them as LF and the
smudge filter writes CRLF to the working tree on checkout. With the
"wrong" CRLF blobs, any tool that rewrites these files on Linux/macOS
during CI leaves them in a state `git status` reports as modified,
failing the "Ensure no modified/untracked files" check:

  Changes not staged for commit:
    modified:   build-tools/banned-apis/banned-apis.targets
    modified:   src/Mono.Android/Mono.Android.csproj

Example failing build:
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=14283875

Run `git add --renormalize` on the two affected files so the index
stores LF (matching `.gitattributes`). `git diff -w` shows no
content change; only line endings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@jonathanpeppers jonathanpeppers marked this pull request as draft June 4, 2026 23:43
…r preview band

The previous attempt added `dotnet workload config --update-mode manifests`,
but the install still failed on 10.0.400-preview SDKs with:

    Workload installation failed: Workload ID android-deps is not recognized.

Root cause: `SdkDirectoryWorkloadManifestProvider` enumerates loose
manifests from `<root>/<SdkFeatureBand.ToString()>/`. For SDK
10.0.400-preview.0.26281.104, that band string is `10.0.400-preview.0`,
not `10.0.400`. The synthetic `android-deps` manifest was being written
to `lib/sdk-manifests/10.0.400/android.deps.workload/...`, so the SDK
never discovered it.

Fix: write the synthetic `android.deps.workload` folder under
`$(DotNetPreviewVersionBand)` (which already includes the preview
suffix and matches `SdkFeatureBand.ToString()` for both stable and
preview SDKs). `_LocalAndroidManifestFolder` is left under
`$(DotNetSdkManifestsFolder)` since it is only the packaging source
for the workload-manifest NuGet, not a path the SDK reads at install
time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants