Skip to content

[ci] Scope Dependabot NuGet scanning to stable-SDK directories#11522

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/scope-dependabot-nuget
Open

[ci] Scope Dependabot NuGet scanning to stable-SDK directories#11522
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/scope-dependabot-nuget

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Dependabot's weekly NuGet job has been failing on main (e.g. run 26533399988) with dependency_file_not_found / MissingFileException. The container Dependabot uses only ships the previous-stable .NET SDK (currently 10.0.103) and has no Android workload, while main always targets the next .NET release. MSBuild evaluation aborts on every net*-android csproj and on classic-style binding test projects, killing the run.

This is a permanent condition: as long as main is one release ahead of stable, Dependabot will never be able to evaluate workload-dependent projects. The fix scopes Dependabot to a curated allow-list of folders that build cleanly against the stable SDK with no Android workload:

  • /build-tools (10 projects — xa-prep-tasks, BootstrapTasks, xaprepare, jnienv-gen, ...)
  • /tools (11 projects — assembly-store-reader, decompress-assemblies, relnote-gen, ...)
  • /src/Xamarin.Android.Build.Tasks (4 projects — highest-value, holds most third-party PackageReferences)

Verified each candidate uses only $(DotNetStableTargetFramework) (= net10.0) or netstandard2.0, and none import workload-specific targets.

Trade-off

Packages referenced only by net*-android projects (e.g. dependencies pulled in by Mono.Android-Tests) will not get Dependabot update PRs. We're accepting that to keep the weekly job green; partial coverage is better than total failure. The allow-list will need occasional extension when a new non-workload project shows up in a different folder, hence the comment in dependabot.yml.

The other Dependabot entries (gradle, gitsubmodule) are unchanged.

Dependabot's NuGet job has been failing on main with
`dependency_file_not_found` / `MissingFileException`. Root cause:
Dependabot's container only ships the previous-stable .NET SDK
(currently 10.0) with no Android workload, while `main` always
targets the next .NET release. MSBuild evaluation aborts on any
`net*-android` csproj, killing the job.

Replace `directory: /` with a `directories:` allow-list of
folders that build cleanly against the stable SDK with no Android
workload: /build-tools, /tools, and /src/Xamarin.Android.Build.Tasks.
This is permanent — main will always be one release ahead of
Dependabot — so we accept that packages only referenced from
net*-android projects won't get automatic update PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 27, 2026 19:38
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

Scopes Dependabot NuGet scanning to only the subset of the repo that can be evaluated using the stable .NET SDK inside Dependabot’s container (without requiring the Android workload), preventing the weekly NuGet update job from failing on main.

Changes:

  • Restricts the NuGet ecosystem update configuration from the repo root to an explicit allow-list of directories.
  • Adds in-file documentation explaining why scoping is required and how to extend the list in the future.

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