ci: vcxproj를 packages.config 형식으로 복귀, BuildMsix가 nuget.exe 자동 처리
증상: VS 2022 Enterprise(GitHub windows-latest)에서 PackageReference 형식 vcxproj 빌드 시 ResolveNuGetPackageAssets가 "Sequence contains no elements" 오류로 실패. native vcxproj + PackageReference + msbuild restore 조합의 알려진 회귀. 해결: - src/EverythingToJpeg.Shell/EverythingToJpeg.Shell.vcxproj: PackageReference 제거, packages.config + Microsoft.Windows.ImplementationLibrary.targets imports 복귀, EnsureNuGetPackageBuildImports target 복귀. - src/EverythingToJpeg.Shell/packages.config 재추가. - packaging/BuildMsix.ps1: nuget.exe 없으면 dist.nuget.org에서 자동 다운로드, packages.config 기반 restore를 packages/ 폴더에 수행. - .gitignore: packages/, tools/ 제외. 이러면 사용자 PC(VS 2026)와 CI(VS 2022) 모두 동일한 흐름으로 빌드. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fc73b3c9a7
commit
0e752d76e2
4 changed files with 41 additions and 6 deletions
|
|
@ -75,8 +75,25 @@ if ($LASTEXITCODE -ne 0) { throw 'dotnet publish 실패' }
|
|||
# ---- 2) C++ Shell DLL ----
|
||||
Write-Host ''
|
||||
Write-Host '[2/5] C++ Shell DLL 빌드'
|
||||
& $msbuild $shellProj /t:Restore /p:RestorePackagesConfig=true /p:Configuration=$Configuration /p:Platform=$Platform /v:minimal | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Shell restore 실패' }
|
||||
|
||||
# nuget.exe 자동 다운로드 (없으면)
|
||||
$nuget = Get-Command nuget.exe -ErrorAction SilentlyContinue
|
||||
if (-not $nuget) {
|
||||
$nugetExe = Join-Path $repoRoot 'tools\nuget.exe'
|
||||
if (-not (Test-Path $nugetExe)) {
|
||||
New-Item -ItemType Directory -Path (Split-Path $nugetExe) -Force | Out-Null
|
||||
Write-Host ' nuget.exe 다운로드 중…'
|
||||
Invoke-WebRequest -Uri 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe' -OutFile $nugetExe
|
||||
}
|
||||
$nugetCmd = $nugetExe
|
||||
} else {
|
||||
$nugetCmd = $nuget.Source
|
||||
}
|
||||
|
||||
$packagesDir = Join-Path $repoRoot 'packages'
|
||||
& $nugetCmd restore (Join-Path $repoRoot 'src\EverythingToJpeg.Shell\packages.config') -PackagesDirectory $packagesDir | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) { throw 'NuGet restore 실패' }
|
||||
|
||||
& $msbuild $shellProj /p:Configuration=$Configuration /p:Platform=$Platform /m /v:minimal | Out-Host
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Shell build 실패' }
|
||||
$shellDll = Join-Path $repoRoot ("src\EverythingToJpeg.Shell\$Platform\$Configuration\EverythingToJpeg.Shell.dll")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue