Repository navigation
fix(sdk): Skip UNOB0029 for Testing Platform test projects - #26249
Conversation
MSTest.Sdk and xUnit v3 test projects run on Microsoft.Testing.Platform and are Exe, but only set IsTestingPlatformApplication, not IsTestProject. A test project referencing an Uno project failed with UNOB0029. Skip the check when IsTestingPlatformApplication is true, and correct the comment on which runner sets which property. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TXMNu1grTmfuTQEg1iNSrT
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Claude finished @MartinZikmund's task in 10s —— View job Review of #26249Verdict: ship. No inline findings.
Two cross-cutting notes, neither blocking:
The commit and PR title follow Conventional Commits. |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-26249/docs/index.html |
GitHub Issue: n/a (no existing issue)
PR Type:
🐞 Bugfix
What changed? 🚀
dotnet teston a<Project Sdk="MSTest.Sdk">project (Microsoft.Testing.Platform) that references an Uno project fails withUNOB0029. The check skips test projects throughIsTestProject, but MSTest.Sdk and xUnit v3 don't set it. They only getIsTestingPlatformApplication=true, and they areExe, so they were treated as application heads. Apps had to addUnoDisableUNOB0029Validationto their test projects.ValidateUnoSdkUsagenow also skips whenIsTestingPlatformApplicationistrue. The comment claimed all of these runners setIsTestProject; it now says which property covers which runner, and the docs line is adjusted to match.Verified with a stand-in project that imports the real
ValidateUnoSdkUsagetarget (extracted verbatim fromuno.winui.common.targets, since the full file pulls in source generator imports). Randotnet msbuild -t:ValidateUnoSdkUsageagainst master's file and the patched one:MSTest.Sdk4.5.2 on MTPxunit.v3package)IsTestProject)Microsoft.NET.Test.SdkMicrosoft.NET.SdkExe, no test packagesExe+UnoDisableUNOB0029Validation=trueNo test added: the earlier change to this check (83ed8ea) had none, and the repo has no harness for build validations in
build/nuget.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_01TXMNu1grTmfuTQEg1iNSrT