Skip to content

Commit c59e1d2

Browse files
ci: add --no-cache to dotnet restore to prevent stale NuGet resolution
The NuGet global packages cache on CI runners can mask NU1603 warnings by satisfying transitive dependencies from cached packages rather than performing fresh resolution against the feed. Adding --no-cache ensures CI always validates package resolution from scratch, matching the behavior of clean publish agents.
1 parent 9d3d349 commit c59e1d2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/core-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: pnpm install
4141

4242
- name: Restore .NET dependencies
43-
run: dotnet restore
43+
run: dotnet restore --no-cache
4444
working-directory: packages/typespec-vs
4545

4646
- name: Build

eng/tsp-core/pipelines/templates/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ steps:
3535
retryCountOnTaskFailure: 3
3636

3737
- ${{ if parameters.useDotNet }}:
38-
- script: dotnet restore
38+
- script: dotnet restore --no-cache
3939
displayName: Restore .NET Dependencies
4040
workingDirectory: packages/typespec-vs

0 commit comments

Comments
 (0)