sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

test(ci): Visual Studio MSBuild on Windows

Open Flash0ver opened this issue 5 months ago • 1 comments

Description

Recently, we run into issues with Sentry-package-consumer builds on Windows via Visual Studio's MSBuild and/or the .NET SDK bundles with Visual Studio: #4141, #4292

Let's improve and continuously test the development experience on Windows via Visual Studio for both building and consuming the Sentry .NET SDKs.

Option to catch related issues early Add a CI build step on Windows-only that utilizes Visual Studio

  • setup-msbuild Marketplace
  • setup-msbuild Repository
  • GitHub-hosted runners don't seem to have the latest version installed ... at the time of issue-creation where 17.14.6 has been released recently
    • windows-2025: Visual Studio Enterprise 2022 17.13.35825.156
    • windows-2022: Visual Studio Enterprise 2022 17.13.35825.156
    • windows-2019: Visual Studio Enterprise 2019 16.11.36107.64

Option to test related issues Add an integration test for Windows-only that utilizes Visual Studio

  • again, similar to above, we may not have the latest Visual Studio version available in the GitHub-hosted runners

Update: May be a pre-release Workflow rather than a PR-check.

Flash0ver avatar Jun 20 '25 09:06 Flash0ver

Last resort, but if we need to we can use our self hosted runner where we have devkits. We'd need to have a private fork for that though so would need to be a pre-release step only or something, not a per PR check.

bruno-garcia avatar Jun 20 '25 12:06 bruno-garcia

After #4300, we could still add more coverage for the user experience on Windows and Visual Studio via Integration Tests.

E.g.

  • install Visual Studio, or the respective MSBuild tools, or the respective .NET SDK
    • matrix: supported (latest) versions of Visual Studio
      • [Visual Studio 2019 version 16.11)(https://learn.microsoft.com/visualstudio/releases/2019/servicing-vs2019) / .NET 5.0
      • Visual Studio 2022 / .NET 8.0 or .NET 9.0 (not sure if .NET 10 will remain fully supported on VS2022)
      • Visual Studio 2026 / .NET 10+
  • create App
    • .NET Console App or UWP App or ...
    • Use Sentry
  • add Sentry package
    • may pick netstandard2.0 lib depending on the target
  • build app
    • may catch incompatibilities in the .props and .targets that we ship
    • may catch incompatibilities in the Roslyn Compiler Extensions (e.g. Analyzers, Source-Generators, ...) that we ship
  • run app
    • may catch other issues at runtime

Flash0ver avatar Sep 26 '25 09:09 Flash0ver