sentry-dotnet
sentry-dotnet copied to clipboard
test(ci): Visual Studio MSBuild on Windows
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.6has been released recentlywindows-2025: Visual Studio Enterprise 2022 17.13.35825.156windows-2022: Visual Studio Enterprise 2022 17.13.35825.156windows-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.
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.
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+
- matrix: supported (latest) versions of Visual Studio
- create App
- .NET Console App or UWP App or ...
- Use Sentry
- add
Sentrypackage- may pick
netstandard2.0lib depending on the target
- may pick
- build app
- may catch incompatibilities in the
.propsand.targetsthat we ship - may catch incompatibilities in the Roslyn Compiler Extensions (e.g. Analyzers, Source-Generators, ...) that we ship
- may catch incompatibilities in the
- run app
- may catch other issues at runtime