[Build] Separate WinRT props from common .NET props, make verify script more robust and faster#48059
[Build] Separate WinRT props from common .NET props, make verify script more robust and faster#48059daverayment wants to merge 2 commits into
Conversation
… from Common.Dotnet.CsWinRT.props into it. Rewrite verifyCommonProps.ps1 to be faster and more robust. Remove previous exclusion for PowerAccent.Common and remove hard-coded TargetFramework from the same project.
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, 👼 SARIF report, or 📝 job summary for details.Unrecognized words (4)DWRITE These words are not needed and should be removedABlocked AClient AColumn ACR ADate ADifferent AHybrid ALarger AModifier ANull AOklab APeriod ARandom ARemapped ASingle ASUS bck BNumber BOklab BVal BValue CAtl CCom CContext CDeclaration CElems Chunghwa CImage CMock CPower CSearch CSettings CSOT CStyle CTest CVal CVirtual DArchitectures DComposition defaulttonearest diu DSVG dwrite EAccess EFile EInvalid ENot EProvider ESettings eurochange FErase FInc FMask FNumber FRestore GNumber GValue Hann HHmmssfff Hostx HPhysical HSpeed HSync HVal HValue HWP IPREVIEW ITHUMBNAIL IVO kdc LExit LPCFHOOKPROC LPrivate LReader LUMA LVal lwin MMdd MRT MSHCTX MSHLFLAGS Nanjing newcolor NLog oldcolor outsourced PBlob PElems PHL pinboard PStr PToy QDS RAlt RAquadrant rectp RKey RNumber scanled suntimes Tianma UBreak UCallback UError UFlags UHash UMax UMin unsubscribes UOffset UType vcenter VDesktop vredraw VSpeed VSync WBounds WClass workerw WReserved XAxis XButton XDeployment XDimension XDocument XElement XFile XIncrement XLoc XNamespace XPels XPixel XPos XResource XSpeed XStr XTimer YAxis YDimension YIncrement YPels YPos YResolution YSpeed YStr YTimerTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:daverayment/PowerToys.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/cfb6f7e75bbfc89c71eaa30366d0c166f1bd9c8c/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/26306950766/attempts/1' &&
git commit -m 'Update check-spelling metadata'If the flagged items are 🤯 false positivesIf items relate to a ...
|
Summary of the Pull Request
Separates out the common .NET build properties from Common.Dotnet.CsWinRT.props into a new file so POCO libraries don't have to import WinRT or add exclusions to verifyCommonProps.ps1. Also updates the verify script for robustness and speed.
PR Checklist
Detailed Description of the Pull Request / Additional comments
This is a follow-on from #47211, which included a C# project that didn't target WinRT. Previously, all C# projects were mandated to include Common.Dotnet.CsWinRT.props, even if they didn't need the WinRT import, because the common .NET build properties like
TargetFrameworkand Debug/Release configuration were included in the same file.This PR separates out the non-WinRT information into a new Common.Dotnet.props file. The existing Common.Dotnet.CsWinRT.props file imports this, meaning no changes are required for existing C# projects.
Additionally, the verifyCommonProps.ps1 script has been updated to remove redundant exclusions, add checks for malformed XML, and to speed up the scan.
Changes to verifyCommonProps.ps1
The following updates were made:
EnumerateFiles()instead of Powershell's slow file enumeration.XmlDocument.Load()to quickly load the content of the file.GetElementsByTagName()with a '*' wildcard for the namespace to pull outImporttags regardless of location or ns prefix.breakon successful match, so the whole file need not be scanned.try/catchadded to prevent a .csproj XML parsing error from breaking the CI.Validation Steps Performed
Verify Script Performance