From 32c9200216a51b5fcb4d850e037ddd5994570bd6 Mon Sep 17 00:00:00 2001 From: Simon Jackson Date: Thu, 2 Apr 2026 13:38:33 +0100 Subject: [PATCH] fix(ci): use x86/x64 solution platform names for RDPWrapOffsetFinder.sln The solution GlobalSection only declares Release|x86 and Release|x64. Passing Platform=Win32 to msbuild with a .sln target is invalid and causes: MSB4126: The specified solution configuration 'Release|Win32' is invalid. Add sln_platform (x86/x64) used only for the .sln invocation; keep Platform=Win32 for the Zydis vcxproj build and the output path lookup (vcxproj maps x86->Win32 for its OutDir so finder_plat=Win32 stays correct). Affects both build-offsetfinder.yml and build-and-release.yml. --- .github/workflows/build-and-release.yml | 7 ++++--- .github/workflows/build-offsetfinder.yml | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index adeb166..a4d7c9f 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -109,8 +109,8 @@ jobs: Write-Host "Submodule version: $version" foreach ($cfg in @( - @{ Platform = 'x64'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' } - @{ Platform = 'Win32'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' } + @{ Platform = 'x64'; SlnPlatform = 'x64'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX64'; Arch = 'x64' } + @{ Platform = 'Win32'; SlnPlatform = 'x86'; ZydisCfg = 'Release MD DLL'; ZydisBin = 'ReleaseX86'; Arch = 'x86' } )) { # Build Zydis DLL msbuild src-csharp/RDPOffsetFinder/zydis/msvc/zydis/Zydis.vcxproj ` @@ -123,10 +123,11 @@ jobs: # where zydis/ lives - vcxproj AdditionalIncludeDirectories and # AdditionalDependencies both use $(SolutionDir)\zydis\... and # fail with C1083 when the vcxproj is targeted directly. + # NB: the solution uses x86/x64 platform names (not Win32) - use SlnPlatform. msbuild src-csharp/RDPOffsetFinder/RDPWrapOffsetFinder.sln ` /t:RDPWrapOffsetFinder ` /p:Configuration=Release ` - /p:Platform="$($cfg.Platform)" ` + /p:Platform="$($cfg.SlnPlatform)" ` /p:PlatformToolset=v143 ` /v:minimal diff --git a/.github/workflows/build-offsetfinder.yml b/.github/workflows/build-offsetfinder.yml index 7328070..fd02364 100644 --- a/.github/workflows/build-offsetfinder.yml +++ b/.github/workflows/build-offsetfinder.yml @@ -26,10 +26,12 @@ jobs: matrix: include: - platform: x64 + sln_platform: x64 zydis_cfg: "Release MD DLL" zydis_bin: ReleaseX64 finder_plat: x64 - platform: Win32 + sln_platform: x86 zydis_cfg: "Release MD DLL" zydis_bin: ReleaseX86 finder_plat: Win32 @@ -55,13 +57,14 @@ jobs: # Build via .sln so $(SolutionDir) resolves to the submodule root where # AdditionalIncludeDirectories and AdditionalDependencies reference zydis/ + # NB: the solution uses x86/x64 platform names (not Win32) - use sln_platform. - name: Build RDPWrapOffsetFinder (${{ matrix.platform }}) working-directory: src-csharp/RDPOffsetFinder run: | msbuild RDPWrapOffsetFinder.sln ` /t:RDPWrapOffsetFinder ` /p:Configuration=Release ` - /p:Platform="${{ matrix.platform }}" ` + /p:Platform="${{ matrix.sln_platform }}" ` /p:PlatformToolset=v143 ` /v:minimal