fix: Automatic Dependency Submission workflow (global.json + Sample's local ProjectReferences) - #109
Conversation
…ard is set "10.0.0" isn't a valid/published SDK version, which broke the new Automatic Dependency Submission workflow (actions/setup-dotnet@v6 requires a full version - major.minor.featureband+patch - when rollForward is specified). Aligns with the sibling repos (Plugin.Bluetooth, Laerdal.Dfu.Bindings.Android/iOS), which already use 10.0.100.
There was a problem hiding this comment.
🟢 Approval recommended
The change is a minimal, valid global.json update that directly addresses the documented workflow failure without impacting library runtime behavior.
Pull request overview
Updates the repository’s .NET SDK pin in global.json to a full SDK version so GitHub Actions (notably actions/setup-dotnet with rollForward configured) accepts it and the Automatic Dependency Submission workflow can run successfully.
Changes:
- Change
global.jsonsdk.versionfrom10.0.0to10.0.100to satisfy the “full SDK version required when rollForward is set” constraint.
File summaries
| File | Description |
|---|---|
| global.json | Pins sdk.version to a full SDK version (10.0.100) compatible with rollForward: latestMinor. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…th with a NuGet PackageReference
Laerdal.Dfu.Sample.csproj referenced ../../Laerdal_Plugin.Bluetooth/... - a path
that only exists on one machine's local clone layout, not in CI or any other
contributor's checkout, which is why Automatic Dependency Submission failed at
restore ("Skipping project ... because it was not found").
Bluetooth.Abstractions and Bluetooth.Abstractions.Scanning aren't published as
separate NuGet packages - Plugin.Bluetooth bundles them into the single
Bluetooth.Maui package (PrivateAssets="all" on those ProjectReferences in
Bluetooth.Maui.csproj), and the Sample app's own code only ever references
Bluetooth.Maui directly (AddBluetoothServices()). So one PackageReference to
Bluetooth.Maui 4.0.18 replaces all three ProjectReferences.
Also copied the two OpenSans font files (actually used, registered in
MauiProgram.cs) into this repo's own Resources/Fonts instead of reaching into
the sibling folder for them.
Verified with `dotnet restore Laerdal.Dfu.sln` locally - resolves cleanly.
There was a problem hiding this comment.
🟡 Changes recommended
The PR description’s claim that the Sample only references Bluetooth.Maui conflicts with existing direct Bluetooth.Abstractions.Scanning usages, which must be confirmed to still resolve via the new PackageReference.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 2/4 changed files
- Comments generated: 1
- Review effort level: Lite
Summary
Two separate bugs were breaking the Automatic Dependency Submission workflow:
1. Invalid
global.jsonSDK version"10.0.0"isn't a valid/published .NET SDK version. Changed to"10.0.100", matching thesibling repos (
Plugin.Bluetooth,Laerdal.Dfu.Bindings.Android,Laerdal.Dfu.Bindings.iOS),which already use that value with the same
rollForward: latestMinorsetting.2.
Laerdal.Dfu.Sample.csprojreferenced a local sibling folderThe sample app had
ProjectReferences to..\..\Laerdal_Plugin.Bluetooth\...— a path that onlyexists on one machine's local clone layout, not in CI or any other contributor's checkout.
Root cause:
Bluetooth.Abstractions/Bluetooth.Abstractions.Scanningaren't published asseparate NuGet packages at all —
Plugin.Bluetoothbundles them into the singleBluetooth.Mauipackage (
PrivateAssets="all"on thoseProjectReferences inBluetooth.Maui.csproj), and theSample app's own code only ever references
Bluetooth.Mauidirectly (AddBluetoothServices()).So one
PackageReferencetoBluetooth.Maui4.0.18replaces all threeProjectReferences.Also copied the two
OpenSansfont files (actually used, registered inMauiProgram.cs) intothis repo's own
Resources/Fontsinstead of reaching into the sibling folder for them.Why
Runs that surfaced these:
Test plan
dotnet restore Laerdal.Dfu.slnverified locally — resolves cleanly, no missing projects