From 399fd24f4d5a43299287e495221d3f8acf61acca Mon Sep 17 00:00:00 2001 From: Chaim Date: Mon, 11 May 2026 16:06:16 +0000 Subject: [PATCH] fix(ci): set NUGET_PACKAGES outside system32 (NETSDK1064 fix) NuGet ignores our service-level USERPROFILE override (it uses SHGetKnownFolderPath which returns LocalSystem's profile regardless of the env var) and installs packages to C:\Windows\system32\configsystemprofile\.nuget\packages. 32-bit MSBuild then can't find them because the Win32 File System Redirector silently shunts system32 paths to SysWOW64 for 32-bit processes -> NETSDK1064 'package not found'. NUGET_PACKAGES is NuGet's highest-priority package-folder override and puts everything outside system32, so both restore and build agree on paths and the redirector never gets involved. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 30b9bb3..eac3107 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -11,6 +11,13 @@ env: REGISTRY: gitea.dev.marcus-law.co.il CDN_IMAGE_NAME: espocrm-extensions/outlook-addin-cdn PROVIDER_URL: 'https://platform.dev.marcus-law.co.il/outlook-addin/OutlookAddin.vsto' + # Force NuGet to install + resolve packages outside C:\Windows\System32\. + # NuGet's UserProfile lookup uses SHGetKnownFolderPath which ignores our + # USERPROFILE override and returns the LocalSystem profile when the runner + # service runs as LocalSystem. 32-bit MSBuild then hits Win32 File System + # Redirector and "loses" packages -> NETSDK1064. NUGET_PACKAGES short- + # circuits the lookup and keeps everything outside system32. + NUGET_PACKAGES: 'C:\actions-home\.nuget\packages' jobs: build: