Skip to content

Make the Master Build restore pass: regenerate the Release vendor unsupported lock files - #834

Merged
htsugawa merged 5 commits into
masterfrom
fix/master-build-lock-files
Oct 16, 2026
Merged

htsugawa merged 5 commits into
masterfrom
fix/master-build-lock-files

Conversation

@htsugawa

Copy link
Copy Markdown
Contributor

Why

Master Build (dotnet_master.yml) has failed on every push to master since the lock files came in (#798). The failure happens at dotnet restore /property:Configuration="Release vendor unsupported", with 24 × NU1102 and one NU1004. The lock files pin RawDataHandler-Vendor-UnSupported to versions that are not in the sources CI uses:

  • nuget.org has none;
  • Assemblies/ holds only 1.3.9699.471.

Nothing has been built, tested or published from master since then.

PR Check is a different story: its red X on recent PRs comes from one GUI test. #833 fixes that test, and #833 should merge first.

What changes

1. Lock files (25 files). The 25 packages.lock.ReleaseVendorUnsupported.json files are regenerated against exactly the CI sources (nuget.org plus Assemblies/), with an isolated cache. The diff is limited to three things:

  • 49 RawDataHandler-Vendor-UnSupported entries now resolve to 1.3.9699.471. Their content hash equals the SHA-512 of Assemblies/RawDataHandler-Vendor-UnSupported.1.3.9699.471.nupkg.
  • Four transitive packages are added to five MSDIAL4 sections: Microsoft.Bcl.AsyncInterfaces 5.0.0, System.Memory 4.5.5, System.Numerics.Vectors 4.5.0 and ZstdSharp.Port 0.8.1.
  • MsdialGuiApp gains win-x64 sections.

Directory.Build.props (locked mode), PackageReference ranges, Assemblies/ and all source files are unchanged.

2. Console publish legs. dotnet_master.yml restores and publishes the two console jobs with -p:RestoreLockedMode=false, because their --runtime publish needs RID sections that locked mode refuses (NU1004).

3. Optional, separate commit. dotnet_pr.yml gets a locked "Release vendor unsupported" restore before the Debug restore, so a PR that changes a PackageReference without regenerating the locks fails at PR time instead of on master. Drop this commit if you do not want it.

4. Optional, separate commit. dotnet_master.yml passes -p:ErrorOnDuplicatePublishOutputFiles=false to the MSDIAL5 GUI publish. The publish-msdial4 and publish-msdial5-console commands already pass it. Without it the job fails with NETSDK1152, because System.Data.SQLite.Core 1.0.112.2 ships two byte-identical SQLite.Interop.dll files.

Verified locally (Windows)

Locked restore. A locked "Release vendor unsupported" restore of a clean export, from an empty package cache, with only nuget.org and Assemblies/:

  • 78/78 projects, 0 errors, 0 lock files written;
  • the cache holds only RawDataHandler-Vendor-UnSupported 1.3.9699.471.

The same setup with master's lock files reproduces CI's 24 × NU1102 + NU1004.

Master Build test job. dotnet build --no-restore --no-incremental -c "Release vendor unsupported" gives 0 errors. dotnet test gives 15 assemblies, 2166 tests: 2149 passed, 17 skipped, 0 failed.

Two substitutions were needed on this machine:

  • the .NET 4.8.1 reference assemblies came from the nuget.org package, standing in for windows-latest's installed pack;
  • long paths had to be avoided.

PR Check order: the new locked restore followed by the Debug restore leaves no project in the locked Release state.

Not proven yet

  • The four publish jobs, and the Linux/macOS legs, run for the first time on the push to master.
  • Master artifacts will carry RawDataHandler 1.3.9699.471. Refreshing Assemblies/ with a newer RawDataHandler is a separate change.

For the reviewer (lock-file author)

Please confirm that pinning to the Assemblies/ package is the intended source of truth. The alternative is adding a newer nupkg to Assemblies/.

🤖 Generated with Claude Code

DESKTOP-382ETUR\Hiroshi Tsugawa and others added 4 commits October 16, 2026 00:27
…ces CI uses

Master Build has failed at "Restore packages" since the lock files were
added: 24 projects pinned RawDataHandler-Vendor-UnSupported versions that
are not in Assemblies/ (1.3.9725.142 for the MSDIAL5 chain, 1.0.8739.525 for
the MSDIAL4 and MSFINDER chains), so a locked restore against nuget.org and
Assemblies/ ends in NU1102. MsdialGuiApp also failed NU1004 once
PlatformTarget x64 made the SDK restore it for win-x64.

The 25 lock files were regenerated with an empty NuGet cache and a
nuget.config holding only nuget.org and Assemblies/:

  dotnet restore MsdialWorkbench.sln -p:Configuration="Release vendor unsupported"
    -p:RestoreLockedMode=false -p:AutomaticallyUseReferenceAssemblyPackages=false
    --force-evaluate

(the last property only because the machine lacks the .NET Framework 4.8.1
targeting pack, which windows-latest has). What changes:

- RawDataHandler-Vendor-UnSupported resolves to 1.3.9699.471, the package in
  Assemblies/, in all 49 entries, with that package's dependency list.
- The net48/net481 sections of ChromatogramUI, MsDial,
  MsdialGcmsProcessStandard and MsdialLcmsProcessStandard gain its
  transitive System.Memory, System.Numerics.Vectors, ZstdSharp.Port and
  Microsoft.Bcl.AsyncInterfaces.
- MsdialGuiApp gains net472, net48 and net481 win-x64 sections.

The MSDIAL4 projects ask for 1.0.*, which no source offers, so they get
1.3.9699.471 - what PR Check and the publish jobs before the lock files
already resolved. Directory.Build.props, the PackageReference ranges and
Assemblies/ are unchanged; locked restore stays on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the lock files fixed, the four console steps would still fail:
"dotnet publish --runtime" passes the runtime identifier to every
project's restore, and a lock file that lists no such runtime fails
NU1004 under locked mode. On Linux and macOS the SDK also adds
Microsoft.NETFramework.ReferenceAssemblies to the .NET Framework targets,
which fails the RID-less "Restore packages" step there the same way.

Pass RestoreLockedMode=false to the restore and publish steps of
publish-msdial5-console and publish-msdial4-console. The test job and the
two GUI publish jobs keep the locked restore, so a stale lock file still
fails Master Build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Check restores and builds only "Debug vendor unsupported", which reads
no lock file, so the stale lock files that broke Master Build passed every
pull request. Add the locked "Release vendor unsupported" restore that
Master Build's test job runs, so that a change needing new lock files
fails before it reaches master.

The step runs before the Debug restore, so the build and tests still use
the Debug restore's output exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since PlatformTarget x64 made MsdialGuiApp restore for win-x64, its
publish picks up System.Data.SQLite.Core's runtime assets from both
runtimes/win-x64/native/netstandard2.0 and .../netstandard2.1. The two
SQLite.Interop.dll files are byte-identical and land on the same path, so
publish-msdial5 fails NETSDK1152 once its restore passes.

Pass ErrorOnDuplicatePublishOutputFiles=false, as the publish-msdial4 and
publish-msdial5-console commands in this workflow already do. The
published SQLite.Interop.dll is the same file the build already places
beside MSDIAL.exe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@htsugawa
htsugawa merged commit c678d6f into master Oct 16, 2026
1 check passed
@htsugawa
htsugawa deleted the fix/master-build-lock-files branch October 16, 2026 00:20
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.

1 participant