[ci-scan-net11] Windows Core.DeviceTests build fails with CS8632 in SwipeItemMenuItemHandlerTests
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
## Summary
The Windows device-test build cannot compile `SwipeItemMenuItemHandlerTests.Windows.cs` because nullable annotations are used while nullable annotations are disabled.
## Build Information
- **Pipeline**: maui-pr-devicetests
- **Build**: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1557918
- **Build ID**: 1557918
- **Branch**: net11.0
- **First seen**: 2026-08-18
- **Occurrences**: 3 in last 10 builds
## Affected Legs
- Windows / Core.DeviceTests / unpackaged
## Error Message
```
2026-08-18T19:01:27.7742146Z D:\a\_work\1\s\src\Core\tests\DeviceTests\Handlers\SwipeView\SwipeItemMenuItemHandlerTests.Windows.cs(438,55): error CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [D:\a\_work\1\s\src\Core\tests\DeviceTests\Core.DeviceTests.csproj::TargetFramework=net11.0-windows10.0.19041.0]
```
## Recommended Action
Update `SwipeItemMenuItemHandlerTests.Windows.cs` so its nullable annotations are compiled in an enabled nullable context, then rebuild the Windows unpackaged device-test target.
Contributor guide
Research direction
Open src/Core/tests/DeviceTests/Handlers/SwipeView/SwipeItemMenuItemHandlerTests.Windows.cs and inspect the nullable annotation at line 438 alongside the project's nullable settings. Rebuild the Windows unpackaged Core.DeviceTests target for net11.0; done means the file compiles without CS8632.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems, testing
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100