fix(ci): remove all deps/runtimeconfig json and unset DOTNET_ROOT in-process

Previous approach of env: DOTNET_ROOT='' at the step level wasn't
sufficient — the .NET runtime may have already cached the original
DOTNET_ROOT before pwsh started. Now:

- Remove *.deps.json AND *.runtimeconfig.json from publish output
- Unset DOTNET_ROOT via $env:DOTNET_ROOT = $null inside the pwsh script
- _TestHelper.ps1 also unsets DOTNET_ROOT and cleans deps/runtimeconfig

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-19 09:06:24 -05:00
parent afb1693f94
commit 35805959f4
3 changed files with 21 additions and 11 deletions
+2 -2
View File
@@ -180,8 +180,8 @@ jobs:
- name: Build module
run: dotnet publish src/PSProxmoxVE/PSProxmoxVE.csproj --configuration Release --framework net9.0 --output ./publish/net9.0
- name: Remove deps.json from publish output
run: rm -f ./publish/net9.0/PSProxmoxVE.deps.json
- name: Clean publish output for PS module loading
run: rm -f ./publish/net9.0/*.deps.json ./publish/net9.0/*.runtimeconfig.json
- name: Install Pester 5
shell: pwsh