A locked restore fails with NU1004 whenever the installed .NET SDK patch is newer than the one that wrote the lock files, and an unlocked restore rewrites gclo.Engine/packages.lock.json and gclo.ViewModels/packages.lock.json.
Cause: both projects set EnableSingleFileAnalyzer, which adds the implicit package Microsoft.NET.ILLink.Tasks at the SDK's bundled runtime version. global.json pins 10.0.401 with rollForward: latestFeature, so any newer 10.0.x SDK resolves a different version (10.0.12 in the lock files, 10.0.14 with SDK 10.0.403).
Related defects found in the same review:
.github/workflows/nuget-updates.yml commits **/*.csproj and lock files only, but the update script edits Directory.Packages.props, so the weekly pull request carries lock files without the version change and cannot pass a locked restore.
Directory.Build.props still has VersionPrefix 1.0.1 although v1.1.0 shipped.
Scope
Bump global.json to the current SDK and refresh every lock file.
Add Directory.Packages.props to the update workflow's add-paths.
Set VersionPrefix to the next expected release, 1.1.1.
rollForward stays latestFeature, as the KofTwentyTwo standard asks. The structural question (committed lock files cannot survive a floating SDK) goes to the standards repository.
Acceptance
dotnet build gclo.slnx -p:Platform=x64 -warnaserror -p:RestoreLockedMode=true passes with the SDK named in global.json.
Both test suites pass with the 100% coverage gate; dotnet format --verify-no-changes is clean.
## Problem
A locked restore fails with NU1004 whenever the installed .NET SDK patch is newer than the one that wrote the lock files, and an unlocked restore rewrites `gclo.Engine/packages.lock.json` and `gclo.ViewModels/packages.lock.json`.
Cause: both projects set `EnableSingleFileAnalyzer`, which adds the implicit package `Microsoft.NET.ILLink.Tasks` at the SDK's bundled runtime version. `global.json` pins `10.0.401` with `rollForward: latestFeature`, so any newer 10.0.x SDK resolves a different version (10.0.12 in the lock files, 10.0.14 with SDK 10.0.403).
Related defects found in the same review:
- `.github/workflows/nuget-updates.yml` commits `**/*.csproj` and lock files only, but the update script edits `Directory.Packages.props`, so the weekly pull request carries lock files without the version change and cannot pass a locked restore.
- `Directory.Build.props` still has `VersionPrefix` 1.0.1 although v1.1.0 shipped.
## Scope
- Bump `global.json` to the current SDK and refresh every lock file.
- Add `Directory.Packages.props` to the update workflow's `add-paths`.
- Set `VersionPrefix` to the next expected release, 1.1.1.
`rollForward` stays `latestFeature`, as the KofTwentyTwo standard asks. The structural question (committed lock files cannot survive a floating SDK) goes to the standards repository.
## Acceptance
- `dotnet build gclo.slnx -p:Platform=x64 -warnaserror -p:RestoreLockedMode=true` passes with the SDK named in `global.json`.
- Both test suites pass with the 100% coverage gate; `dotnet format --verify-no-changes` is clean.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
A locked restore fails with NU1004 whenever the installed .NET SDK patch is newer than the one that wrote the lock files, and an unlocked restore rewrites
gclo.Engine/packages.lock.jsonandgclo.ViewModels/packages.lock.json.Cause: both projects set
EnableSingleFileAnalyzer, which adds the implicit packageMicrosoft.NET.ILLink.Tasksat the SDK's bundled runtime version.global.jsonpins10.0.401withrollForward: latestFeature, so any newer 10.0.x SDK resolves a different version (10.0.12 in the lock files, 10.0.14 with SDK 10.0.403).Related defects found in the same review:
.github/workflows/nuget-updates.ymlcommits**/*.csprojand lock files only, but the update script editsDirectory.Packages.props, so the weekly pull request carries lock files without the version change and cannot pass a locked restore.Directory.Build.propsstill hasVersionPrefix1.0.1 although v1.1.0 shipped.Scope
global.jsonto the current SDK and refresh every lock file.Directory.Packages.propsto the update workflow'sadd-paths.VersionPrefixto the next expected release, 1.1.1.rollForwardstayslatestFeature, as the KofTwentyTwo standard asks. The structural question (committed lock files cannot survive a floating SDK) goes to the standards repository.Acceptance
dotnet build gclo.slnx -p:Platform=x64 -warnaserror -p:RestoreLockedMode=truepasses with the SDK named inglobal.json.dotnet format --verify-no-changesis clean.