From b023bec083b298106a3bce650a7b2b2ab35e2ccc Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 22 Jun 2025 13:55:45 +0200 Subject: [PATCH 1/2] ci: add msbuild job --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31356e28de..2812fa27a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -218,6 +218,46 @@ jobs: with: path: integration-test + msbuild: + needs: build-sentry-native + name: MSBuild + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Download sentry-native (Windows) + uses: actions/cache/restore@v4 + with: + path: src/Sentry/Platforms/Native/sentry-native + key: sentry-native-Windows-${{ hashFiles('scripts/build-sentry-native.ps1') }}-${{ hashFiles('.git/modules/modules/sentry-native/HEAD') }} + fail-on-cache-miss: true + enableCrossOsArchive: true + + - name: Setup Environment + uses: ./.github/actions/environment + + - name: Build Native Dependencies + uses: ./.github/actions/buildnative + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2 + + - name: Run MSBuild + id: msbuild + run: msbuild Sentry-CI-Build-Windows.slnf -t:Restore,Build -p:Configuration=Release --nologo -v:minimal -flp:logfile=msbuild.log -p:CopyLocalLockFileAssemblies=true -bl:msbuild.binlog + + - name: Upload logs + if: ${{ steps.msbuild.outcome != 'skipped' }} + uses: actions/upload-artifact@v4 + with: + name: ${{ matrix.target || runner.os }}-msbuild-logs + path: | + msbuild.log + msbuild.binlog trim-analysis: needs: build-sentry-native From 8299d31fc34215d07333d2f17818b63c877854b6 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 22 Jun 2025 11:28:51 +0200 Subject: [PATCH 2/2] fix: build with Visual Studio > Sentry.Native.targets(37,14): error MSB4186: Invalid static method invocation syntax: > "[System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier". > Method 'System.Runtime.InteropServices.RuntimeInformation.RuntimeIdentifier' not found. > Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). > Check that all parameters are defined, are of the correct type, and are specified in the right order. --- src/Sentry/Platforms/Native/Sentry.Native.targets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Sentry/Platforms/Native/Sentry.Native.targets b/src/Sentry/Platforms/Native/Sentry.Native.targets index befa26d123..05114b9d53 100644 --- a/src/Sentry/Platforms/Native/Sentry.Native.targets +++ b/src/Sentry/Platforms/Native/Sentry.Native.targets @@ -34,35 +34,35 @@ - + true \sentry-native\$(NativeLibRelativePath-win-x64) - + true \sentry-native\$(NativeLibRelativePath-win-arm64) - + true \sentry-native\$(NativeLibRelativePath-linux-x64) - + true \sentry-native\$(NativeLibRelativePath-linux-musl-x64) - + true \sentry-native\$(NativeLibRelativePath-linux-arm64)