[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-dotnet-maui-unit-testing":3,"mdc--fbk09n-key":46,"related-repo-dotnet-maui-unit-testing":701,"related-org-dotnet-maui-unit-testing":808},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":41,"sourceUrl":44,"mdContent":45},"maui-unit-testing","add automated tests to .NET MAUI apps","Add and improve automated tests for .NET MAUI apps, focusing on ViewModels, services, platform abstractions, and unit\u002Fintegration\u002Fdevice test boundaries. USE FOR: xUnit projects, ViewModel tests that avoid MauiProgram.CreateMauiApp, fakes\u002Fmocks, MAUI injectable platform interfaces such as IGeolocation\u002FIConnectivity\u002FIPreferences\u002FIFileSystem\u002FISecureStorage instead of static Essentials calls, avoiding PlatformNotSupportedException in test hosts, testing navigation\u002Fdata services, Microsoft.Maui.Build.AppProjectReference for MAUI app references, and deciding what must run on device. DO NOT USE FOR: UI automation or production profiling.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"dotnet",".NET (Microsoft)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fdotnet.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"MAUI","maui","tag",{"name":17,"slug":18,"type":15},".NET","net",{"name":20,"slug":21,"type":15},"Mobile","mobile",{"name":23,"slug":24,"type":15},"Testing","testing",190,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmaui-labs","2026-07-12T08:22:43.815081",null,21,[31,32,33,8,34,35,14,36,37,21,38,39,40],"ai","android","desktop","ios","maccatalyst","mcp","microsoft","multi-platform","user-interface","winui",{"repoUrl":26,"stars":25,"forks":29,"topics":42,"description":43},[31,32,33,8,34,35,14,36,37,21,38,39,40],"Experimental and pre-release tools for .NET MAUI","https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmaui-labs\u002Ftree\u002FHEAD\u002Fplugins\u002Fdotnet-maui-app\u002Fskills\u002Fmaui-unit-testing","---\nname: maui-unit-testing\ndescription: >-\n  Add and improve automated tests for .NET MAUI apps, focusing on ViewModels, services, platform abstractions, and unit\u002Fintegration\u002Fdevice test boundaries. USE FOR: xUnit projects, ViewModel tests that avoid MauiProgram.CreateMauiApp, fakes\u002Fmocks, MAUI injectable platform interfaces such as IGeolocation\u002FIConnectivity\u002FIPreferences\u002FIFileSystem\u002FISecureStorage instead of static Essentials calls, avoiding PlatformNotSupportedException in test hosts, testing navigation\u002Fdata services, Microsoft.Maui.Build.AppProjectReference for MAUI app references, and deciding what must run on device. DO NOT USE FOR: UI automation or production profiling.\n---\n\n# MAUI Unit Testing\n\nUse this skill to make MAUI app logic testable without requiring every test to\nstart a device or simulator. Keep UI framework dependencies at the edges.\n\n## Workflow\n\n1. Identify what is being tested: ViewModel, service, navigation abstraction,\n   storage wrapper, platform capability, or UI integration.\n2. For ViewModels and services, create a normal xUnit test project.\n3. Introduce interfaces around platform APIs such as geolocation, preferences,\n   secure storage, media picker, file picker, and navigation.\n4. Use fakes or mocks for those interfaces in unit tests.\n5. Use device\u002Fintegration tests only for behavior that requires handlers,\n   platform permissions, native controls, or OS services.\n6. If a test or tooling project must reference a MAUI app project, use the\n   AppProjectReference support provided by `Microsoft.Maui.Build.AppProjectReference`\n   instead of forcing the app project to behave like a normal class library.\n\n## Test Boundary Guide\n\n| Test target | Test type |\n| --- | --- |\n| ViewModel commands, validation, state transitions | Unit test |\n| API\u002Fdata service with fake handler | Unit test |\n| Secure storage wrapper behavior with fake storage | Unit test |\n| Shell route strings and navigation abstraction calls | Unit test |\n| Handler rendering, native permissions, real pickers | Device\u002Fintegration test |\n| End-to-end UI flow in a running app | DevFlow\u002Fruntime automation |\n\n## ViewModel Test Pattern\n\nAlways show at least a happy-path test AND an error\u002Fedge-case test. Use a\nmocking library (NSubstitute, Moq) or a hand-rolled fake — both are valid.\n\n```csharp\npublic sealed class ProductsViewModelTests\n{\n    [Fact]\n    public async Task LoadAsync_ServiceReturnsProducts_PopulatesProducts()\n    {\n        var service = Substitute.For\u003CIProductsService>();\n        service.LoadAsync().Returns([new Product(\"Coffee\")]);\n        var viewModel = new ProductsViewModel(service);\n\n        await viewModel.LoadAsync();\n\n        Assert.Single(viewModel.Products);\n        Assert.Equal(\"Coffee\", viewModel.Products[0].Name);\n    }\n\n    [Fact]\n    public async Task LoadAsync_ServiceThrows_SetsErrorState()\n    {\n        var service = Substitute.For\u003CIProductsService>();\n        service.LoadAsync().Returns(Task.FromException\u003CIReadOnlyList\u003CProduct>>(\n            new HttpRequestException(\"offline\")));\n        var viewModel = new ProductsViewModel(service);\n\n        await viewModel.LoadAsync();\n\n        Assert.Empty(viewModel.Products);\n        Assert.NotNull(viewModel.ErrorMessage);\n    }\n}\n```\n\n## Platform Abstraction Pattern\n\nMAUI exposes injectable interfaces for many platform services. Prefer the built-in\ninterface when it exists, such as `IGeolocation`, `IFileSystem`, `IPreferences`,\n`IConnectivity`, or `ISecureStorage`. Create a custom wrapper when the app needs\nto combine platform APIs, normalize errors, or expose an app-specific contract.\n\n```csharp\npublic interface ILocationService\n{\n    Task\u003CLocation?> GetLocationAsync(CancellationToken cancellationToken);\n}\n```\n\nViewModels depend on `ILocationService`, not `Geolocation.Default` directly.\nThe production MAUI project registers the platform implementation; tests pass a\nfake implementation.\n\n## Anti-Patterns\n\n- Do not call `MauiProgram.CreateMauiApp()` in ordinary ViewModel unit tests.\n- Do not require a simulator for tests that only validate C# state transitions.\n- Do not use static MAUI platform services directly from ViewModels if the logic\n  needs deterministic unit tests.\n- Do not call `MainThread.BeginInvokeOnMainThread` or `Dispatcher.Dispatch`\n  inside synchronous ViewModel command logic; in plain xUnit hosts there may be\n  no initialized platform dispatcher. Keep dispatching at the UI layer or behind\n  an injectable dispatcher abstraction.\n- Do not put UI automation expectations in unit tests; use DevFlow\u002Fruntime\n  automation for running-app behavior.\n\n## Validation Checklist\n\n- ViewModel tests run without a device.\n- Platform APIs are behind interfaces or wrappers.\n- Test project references follow the repo's package management conventions.\n- Device-only behavior is explicitly separated from unit-testable logic.\n",{"data":47,"body":48},{"name":4,"description":6},{"type":49,"children":50},"root",[51,59,65,72,116,122,225,231,236,500,506,550,587,608,614,666,672,695],{"type":52,"tag":53,"props":54,"children":55},"element","h1",{"id":4},[56],{"type":57,"value":58},"text","MAUI Unit Testing",{"type":52,"tag":60,"props":61,"children":62},"p",{},[63],{"type":57,"value":64},"Use this skill to make MAUI app logic testable without requiring every test to\nstart a device or simulator. Keep UI framework dependencies at the edges.",{"type":52,"tag":66,"props":67,"children":69},"h2",{"id":68},"workflow",[70],{"type":57,"value":71},"Workflow",{"type":52,"tag":73,"props":74,"children":75},"ol",{},[76,82,87,92,97,102],{"type":52,"tag":77,"props":78,"children":79},"li",{},[80],{"type":57,"value":81},"Identify what is being tested: ViewModel, service, navigation abstraction,\nstorage wrapper, platform capability, or UI integration.",{"type":52,"tag":77,"props":83,"children":84},{},[85],{"type":57,"value":86},"For ViewModels and services, create a normal xUnit test project.",{"type":52,"tag":77,"props":88,"children":89},{},[90],{"type":57,"value":91},"Introduce interfaces around platform APIs such as geolocation, preferences,\nsecure storage, media picker, file picker, and navigation.",{"type":52,"tag":77,"props":93,"children":94},{},[95],{"type":57,"value":96},"Use fakes or mocks for those interfaces in unit tests.",{"type":52,"tag":77,"props":98,"children":99},{},[100],{"type":57,"value":101},"Use device\u002Fintegration tests only for behavior that requires handlers,\nplatform permissions, native controls, or OS services.",{"type":52,"tag":77,"props":103,"children":104},{},[105,107,114],{"type":57,"value":106},"If a test or tooling project must reference a MAUI app project, use the\nAppProjectReference support provided by ",{"type":52,"tag":108,"props":109,"children":111},"code",{"className":110},[],[112],{"type":57,"value":113},"Microsoft.Maui.Build.AppProjectReference",{"type":57,"value":115},"\ninstead of forcing the app project to behave like a normal class library.",{"type":52,"tag":66,"props":117,"children":119},{"id":118},"test-boundary-guide",[120],{"type":57,"value":121},"Test Boundary Guide",{"type":52,"tag":123,"props":124,"children":125},"table",{},[126,145],{"type":52,"tag":127,"props":128,"children":129},"thead",{},[130],{"type":52,"tag":131,"props":132,"children":133},"tr",{},[134,140],{"type":52,"tag":135,"props":136,"children":137},"th",{},[138],{"type":57,"value":139},"Test target",{"type":52,"tag":135,"props":141,"children":142},{},[143],{"type":57,"value":144},"Test type",{"type":52,"tag":146,"props":147,"children":148},"tbody",{},[149,163,175,187,199,212],{"type":52,"tag":131,"props":150,"children":151},{},[152,158],{"type":52,"tag":153,"props":154,"children":155},"td",{},[156],{"type":57,"value":157},"ViewModel commands, validation, state transitions",{"type":52,"tag":153,"props":159,"children":160},{},[161],{"type":57,"value":162},"Unit test",{"type":52,"tag":131,"props":164,"children":165},{},[166,171],{"type":52,"tag":153,"props":167,"children":168},{},[169],{"type":57,"value":170},"API\u002Fdata service with fake handler",{"type":52,"tag":153,"props":172,"children":173},{},[174],{"type":57,"value":162},{"type":52,"tag":131,"props":176,"children":177},{},[178,183],{"type":52,"tag":153,"props":179,"children":180},{},[181],{"type":57,"value":182},"Secure storage wrapper behavior with fake storage",{"type":52,"tag":153,"props":184,"children":185},{},[186],{"type":57,"value":162},{"type":52,"tag":131,"props":188,"children":189},{},[190,195],{"type":52,"tag":153,"props":191,"children":192},{},[193],{"type":57,"value":194},"Shell route strings and navigation abstraction calls",{"type":52,"tag":153,"props":196,"children":197},{},[198],{"type":57,"value":162},{"type":52,"tag":131,"props":200,"children":201},{},[202,207],{"type":52,"tag":153,"props":203,"children":204},{},[205],{"type":57,"value":206},"Handler rendering, native permissions, real pickers",{"type":52,"tag":153,"props":208,"children":209},{},[210],{"type":57,"value":211},"Device\u002Fintegration test",{"type":52,"tag":131,"props":213,"children":214},{},[215,220],{"type":52,"tag":153,"props":216,"children":217},{},[218],{"type":57,"value":219},"End-to-end UI flow in a running app",{"type":52,"tag":153,"props":221,"children":222},{},[223],{"type":57,"value":224},"DevFlow\u002Fruntime automation",{"type":52,"tag":66,"props":226,"children":228},{"id":227},"viewmodel-test-pattern",[229],{"type":57,"value":230},"ViewModel Test Pattern",{"type":52,"tag":60,"props":232,"children":233},{},[234],{"type":57,"value":235},"Always show at least a happy-path test AND an error\u002Fedge-case test. Use a\nmocking library (NSubstitute, Moq) or a hand-rolled fake — both are valid.",{"type":52,"tag":237,"props":238,"children":243},"pre",{"className":239,"code":240,"language":241,"meta":242,"style":242},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","public sealed class ProductsViewModelTests\n{\n    [Fact]\n    public async Task LoadAsync_ServiceReturnsProducts_PopulatesProducts()\n    {\n        var service = Substitute.For\u003CIProductsService>();\n        service.LoadAsync().Returns([new Product(\"Coffee\")]);\n        var viewModel = new ProductsViewModel(service);\n\n        await viewModel.LoadAsync();\n\n        Assert.Single(viewModel.Products);\n        Assert.Equal(\"Coffee\", viewModel.Products[0].Name);\n    }\n\n    [Fact]\n    public async Task LoadAsync_ServiceThrows_SetsErrorState()\n    {\n        var service = Substitute.For\u003CIProductsService>();\n        service.LoadAsync().Returns(Task.FromException\u003CIReadOnlyList\u003CProduct>>(\n            new HttpRequestException(\"offline\")));\n        var viewModel = new ProductsViewModel(service);\n\n        await viewModel.LoadAsync();\n\n        Assert.Empty(viewModel.Products);\n        Assert.NotNull(viewModel.ErrorMessage);\n    }\n}\n","csharp","",[244],{"type":52,"tag":108,"props":245,"children":246},{"__ignoreMap":242},[247,258,267,276,285,294,303,312,321,331,340,348,357,366,375,383,391,400,408,416,425,433,441,449,457,465,474,483,491],{"type":52,"tag":248,"props":249,"children":252},"span",{"class":250,"line":251},"line",1,[253],{"type":52,"tag":248,"props":254,"children":255},{},[256],{"type":57,"value":257},"public sealed class ProductsViewModelTests\n",{"type":52,"tag":248,"props":259,"children":261},{"class":250,"line":260},2,[262],{"type":52,"tag":248,"props":263,"children":264},{},[265],{"type":57,"value":266},"{\n",{"type":52,"tag":248,"props":268,"children":270},{"class":250,"line":269},3,[271],{"type":52,"tag":248,"props":272,"children":273},{},[274],{"type":57,"value":275},"    [Fact]\n",{"type":52,"tag":248,"props":277,"children":279},{"class":250,"line":278},4,[280],{"type":52,"tag":248,"props":281,"children":282},{},[283],{"type":57,"value":284},"    public async Task LoadAsync_ServiceReturnsProducts_PopulatesProducts()\n",{"type":52,"tag":248,"props":286,"children":288},{"class":250,"line":287},5,[289],{"type":52,"tag":248,"props":290,"children":291},{},[292],{"type":57,"value":293},"    {\n",{"type":52,"tag":248,"props":295,"children":297},{"class":250,"line":296},6,[298],{"type":52,"tag":248,"props":299,"children":300},{},[301],{"type":57,"value":302},"        var service = Substitute.For\u003CIProductsService>();\n",{"type":52,"tag":248,"props":304,"children":306},{"class":250,"line":305},7,[307],{"type":52,"tag":248,"props":308,"children":309},{},[310],{"type":57,"value":311},"        service.LoadAsync().Returns([new Product(\"Coffee\")]);\n",{"type":52,"tag":248,"props":313,"children":315},{"class":250,"line":314},8,[316],{"type":52,"tag":248,"props":317,"children":318},{},[319],{"type":57,"value":320},"        var viewModel = new ProductsViewModel(service);\n",{"type":52,"tag":248,"props":322,"children":324},{"class":250,"line":323},9,[325],{"type":52,"tag":248,"props":326,"children":328},{"emptyLinePlaceholder":327},true,[329],{"type":57,"value":330},"\n",{"type":52,"tag":248,"props":332,"children":334},{"class":250,"line":333},10,[335],{"type":52,"tag":248,"props":336,"children":337},{},[338],{"type":57,"value":339},"        await viewModel.LoadAsync();\n",{"type":52,"tag":248,"props":341,"children":343},{"class":250,"line":342},11,[344],{"type":52,"tag":248,"props":345,"children":346},{"emptyLinePlaceholder":327},[347],{"type":57,"value":330},{"type":52,"tag":248,"props":349,"children":351},{"class":250,"line":350},12,[352],{"type":52,"tag":248,"props":353,"children":354},{},[355],{"type":57,"value":356},"        Assert.Single(viewModel.Products);\n",{"type":52,"tag":248,"props":358,"children":360},{"class":250,"line":359},13,[361],{"type":52,"tag":248,"props":362,"children":363},{},[364],{"type":57,"value":365},"        Assert.Equal(\"Coffee\", viewModel.Products[0].Name);\n",{"type":52,"tag":248,"props":367,"children":369},{"class":250,"line":368},14,[370],{"type":52,"tag":248,"props":371,"children":372},{},[373],{"type":57,"value":374},"    }\n",{"type":52,"tag":248,"props":376,"children":378},{"class":250,"line":377},15,[379],{"type":52,"tag":248,"props":380,"children":381},{"emptyLinePlaceholder":327},[382],{"type":57,"value":330},{"type":52,"tag":248,"props":384,"children":386},{"class":250,"line":385},16,[387],{"type":52,"tag":248,"props":388,"children":389},{},[390],{"type":57,"value":275},{"type":52,"tag":248,"props":392,"children":394},{"class":250,"line":393},17,[395],{"type":52,"tag":248,"props":396,"children":397},{},[398],{"type":57,"value":399},"    public async Task LoadAsync_ServiceThrows_SetsErrorState()\n",{"type":52,"tag":248,"props":401,"children":403},{"class":250,"line":402},18,[404],{"type":52,"tag":248,"props":405,"children":406},{},[407],{"type":57,"value":293},{"type":52,"tag":248,"props":409,"children":411},{"class":250,"line":410},19,[412],{"type":52,"tag":248,"props":413,"children":414},{},[415],{"type":57,"value":302},{"type":52,"tag":248,"props":417,"children":419},{"class":250,"line":418},20,[420],{"type":52,"tag":248,"props":421,"children":422},{},[423],{"type":57,"value":424},"        service.LoadAsync().Returns(Task.FromException\u003CIReadOnlyList\u003CProduct>>(\n",{"type":52,"tag":248,"props":426,"children":427},{"class":250,"line":29},[428],{"type":52,"tag":248,"props":429,"children":430},{},[431],{"type":57,"value":432},"            new HttpRequestException(\"offline\")));\n",{"type":52,"tag":248,"props":434,"children":436},{"class":250,"line":435},22,[437],{"type":52,"tag":248,"props":438,"children":439},{},[440],{"type":57,"value":320},{"type":52,"tag":248,"props":442,"children":444},{"class":250,"line":443},23,[445],{"type":52,"tag":248,"props":446,"children":447},{"emptyLinePlaceholder":327},[448],{"type":57,"value":330},{"type":52,"tag":248,"props":450,"children":452},{"class":250,"line":451},24,[453],{"type":52,"tag":248,"props":454,"children":455},{},[456],{"type":57,"value":339},{"type":52,"tag":248,"props":458,"children":460},{"class":250,"line":459},25,[461],{"type":52,"tag":248,"props":462,"children":463},{"emptyLinePlaceholder":327},[464],{"type":57,"value":330},{"type":52,"tag":248,"props":466,"children":468},{"class":250,"line":467},26,[469],{"type":52,"tag":248,"props":470,"children":471},{},[472],{"type":57,"value":473},"        Assert.Empty(viewModel.Products);\n",{"type":52,"tag":248,"props":475,"children":477},{"class":250,"line":476},27,[478],{"type":52,"tag":248,"props":479,"children":480},{},[481],{"type":57,"value":482},"        Assert.NotNull(viewModel.ErrorMessage);\n",{"type":52,"tag":248,"props":484,"children":486},{"class":250,"line":485},28,[487],{"type":52,"tag":248,"props":488,"children":489},{},[490],{"type":57,"value":374},{"type":52,"tag":248,"props":492,"children":494},{"class":250,"line":493},29,[495],{"type":52,"tag":248,"props":496,"children":497},{},[498],{"type":57,"value":499},"}\n",{"type":52,"tag":66,"props":501,"children":503},{"id":502},"platform-abstraction-pattern",[504],{"type":57,"value":505},"Platform Abstraction Pattern",{"type":52,"tag":60,"props":507,"children":508},{},[509,511,517,519,525,526,532,534,540,542,548],{"type":57,"value":510},"MAUI exposes injectable interfaces for many platform services. Prefer the built-in\ninterface when it exists, such as ",{"type":52,"tag":108,"props":512,"children":514},{"className":513},[],[515],{"type":57,"value":516},"IGeolocation",{"type":57,"value":518},", ",{"type":52,"tag":108,"props":520,"children":522},{"className":521},[],[523],{"type":57,"value":524},"IFileSystem",{"type":57,"value":518},{"type":52,"tag":108,"props":527,"children":529},{"className":528},[],[530],{"type":57,"value":531},"IPreferences",{"type":57,"value":533},",\n",{"type":52,"tag":108,"props":535,"children":537},{"className":536},[],[538],{"type":57,"value":539},"IConnectivity",{"type":57,"value":541},", or ",{"type":52,"tag":108,"props":543,"children":545},{"className":544},[],[546],{"type":57,"value":547},"ISecureStorage",{"type":57,"value":549},". Create a custom wrapper when the app needs\nto combine platform APIs, normalize errors, or expose an app-specific contract.",{"type":52,"tag":237,"props":551,"children":553},{"className":239,"code":552,"language":241,"meta":242,"style":242},"public interface ILocationService\n{\n    Task\u003CLocation?> GetLocationAsync(CancellationToken cancellationToken);\n}\n",[554],{"type":52,"tag":108,"props":555,"children":556},{"__ignoreMap":242},[557,565,572,580],{"type":52,"tag":248,"props":558,"children":559},{"class":250,"line":251},[560],{"type":52,"tag":248,"props":561,"children":562},{},[563],{"type":57,"value":564},"public interface ILocationService\n",{"type":52,"tag":248,"props":566,"children":567},{"class":250,"line":260},[568],{"type":52,"tag":248,"props":569,"children":570},{},[571],{"type":57,"value":266},{"type":52,"tag":248,"props":573,"children":574},{"class":250,"line":269},[575],{"type":52,"tag":248,"props":576,"children":577},{},[578],{"type":57,"value":579},"    Task\u003CLocation?> GetLocationAsync(CancellationToken cancellationToken);\n",{"type":52,"tag":248,"props":581,"children":582},{"class":250,"line":278},[583],{"type":52,"tag":248,"props":584,"children":585},{},[586],{"type":57,"value":499},{"type":52,"tag":60,"props":588,"children":589},{},[590,592,598,600,606],{"type":57,"value":591},"ViewModels depend on ",{"type":52,"tag":108,"props":593,"children":595},{"className":594},[],[596],{"type":57,"value":597},"ILocationService",{"type":57,"value":599},", not ",{"type":52,"tag":108,"props":601,"children":603},{"className":602},[],[604],{"type":57,"value":605},"Geolocation.Default",{"type":57,"value":607}," directly.\nThe production MAUI project registers the platform implementation; tests pass a\nfake implementation.",{"type":52,"tag":66,"props":609,"children":611},{"id":610},"anti-patterns",[612],{"type":57,"value":613},"Anti-Patterns",{"type":52,"tag":615,"props":616,"children":617},"ul",{},[618,631,636,641,661],{"type":52,"tag":77,"props":619,"children":620},{},[621,623,629],{"type":57,"value":622},"Do not call ",{"type":52,"tag":108,"props":624,"children":626},{"className":625},[],[627],{"type":57,"value":628},"MauiProgram.CreateMauiApp()",{"type":57,"value":630}," in ordinary ViewModel unit tests.",{"type":52,"tag":77,"props":632,"children":633},{},[634],{"type":57,"value":635},"Do not require a simulator for tests that only validate C# state transitions.",{"type":52,"tag":77,"props":637,"children":638},{},[639],{"type":57,"value":640},"Do not use static MAUI platform services directly from ViewModels if the logic\nneeds deterministic unit tests.",{"type":52,"tag":77,"props":642,"children":643},{},[644,645,651,653,659],{"type":57,"value":622},{"type":52,"tag":108,"props":646,"children":648},{"className":647},[],[649],{"type":57,"value":650},"MainThread.BeginInvokeOnMainThread",{"type":57,"value":652}," or ",{"type":52,"tag":108,"props":654,"children":656},{"className":655},[],[657],{"type":57,"value":658},"Dispatcher.Dispatch",{"type":57,"value":660},"\ninside synchronous ViewModel command logic; in plain xUnit hosts there may be\nno initialized platform dispatcher. Keep dispatching at the UI layer or behind\nan injectable dispatcher abstraction.",{"type":52,"tag":77,"props":662,"children":663},{},[664],{"type":57,"value":665},"Do not put UI automation expectations in unit tests; use DevFlow\u002Fruntime\nautomation for running-app behavior.",{"type":52,"tag":66,"props":667,"children":669},{"id":668},"validation-checklist",[670],{"type":57,"value":671},"Validation Checklist",{"type":52,"tag":615,"props":673,"children":674},{},[675,680,685,690],{"type":52,"tag":77,"props":676,"children":677},{},[678],{"type":57,"value":679},"ViewModel tests run without a device.",{"type":52,"tag":77,"props":681,"children":682},{},[683],{"type":57,"value":684},"Platform APIs are behind interfaces or wrappers.",{"type":52,"tag":77,"props":686,"children":687},{},[688],{"type":57,"value":689},"Test project references follow the repo's package management conventions.",{"type":52,"tag":77,"props":691,"children":692},{},[693],{"type":57,"value":694},"Device-only behavior is explicitly separated from unit-testable logic.",{"type":52,"tag":696,"props":697,"children":698},"style",{},[699],{"type":57,"value":700},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":702,"total":807},[703,720,733,747,763,780,796],{"slug":704,"name":704,"fn":705,"description":706,"org":707,"tags":708,"stars":25,"repoUrl":26,"updatedAt":719},"android-slim-bindings","create Android slim bindings for .NET","Create Android slim bindings for MAUI\u002F.NET Android. USE FOR: slim Android binding, Kotlin\u002FJava wrappers, build.gradle.kts, Maven, AAR\u002FJAR, AndroidMavenLibrary, AndroidLibrary, @JvmStatic, XA4241\u002FXA4242, Xamarin.AndroidX\u002FKotlin NuGets. DO NOT USE FOR: iOS\u002FmacOS bindings, general MAUI apps, or NuGet packaging.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[709,710,712,715,718],{"name":17,"slug":18,"type":15},{"name":711,"slug":32,"type":15},"Android",{"name":713,"slug":714,"type":15},"Java","java",{"name":716,"slug":717,"type":15},"Kotlin","kotlin",{"name":20,"slug":21,"type":15},"2026-07-12T08:22:54.006105",{"slug":721,"name":721,"fn":722,"description":723,"org":724,"tags":725,"stars":25,"repoUrl":26,"updatedAt":732},"devflow-automation","automate .NET MAUI app state","Automate MAUI app state through DevFlow Actions. USE FOR: `[DevFlowAction]` shortcuts, login, seed data, deep screens. DO NOT USE FOR: arbitrary methods, DI internals, UI MCP tools, connectivity, or build\u002Fdeploy issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[726,727,730,731],{"name":17,"slug":18,"type":15},{"name":728,"slug":729,"type":15},"Automation","automation",{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},"2026-07-12T08:22:56.616564",{"slug":734,"name":734,"fn":735,"description":736,"org":737,"tags":738,"stars":25,"repoUrl":26,"updatedAt":746},"devflow-connect","diagnose DevFlow agent connectivity issues","Diagnose DevFlow agent connectivity. USE FOR: `maui devflow` connection failures, agent not found, ports, adb forwarding, broker. DO NOT USE FOR: build failures, setup, visual tree, or Blazor CDP.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[739,742,743],{"name":740,"slug":741,"type":15},"Debugging","debugging",{"name":13,"slug":14,"type":15},{"name":744,"slug":745,"type":15},"Networking","networking","2026-07-12T08:22:48.847431",{"slug":748,"name":748,"fn":749,"description":750,"org":751,"tags":752,"stars":25,"repoUrl":26,"updatedAt":762},"dotnet-workload-info","discover MAUI workload metadata","Discover MAUI workload metadata from live NuGet APIs. USE FOR: workload manifest lookup, WorkloadDependencies.json, v3-flatcontainer, CLI-to-NuGet version conversion, Xcode\u002FJDK\u002FAndroid SDK requirements, CI sdkmanager packages, `packageid:Microsoft.Maui.Controls`. DO NOT USE FOR: installing workloads, build debugging, or app version edits.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[753,755,758,761],{"name":754,"slug":241,"type":15},"C#",{"name":756,"slug":757,"type":15},"CLI","cli",{"name":759,"slug":760,"type":15},"Engineering","engineering",{"name":13,"slug":14,"type":15},"2026-07-12T08:22:46.318953",{"slug":764,"name":764,"fn":765,"description":766,"org":767,"tags":768,"stars":25,"repoUrl":26,"updatedAt":779},"ios-slim-bindings","create iOS slim bindings for MAUI","Create iOS slim bindings for MAUI. USE FOR: slim iOS binding, Native Library Interop, Swift\u002FObjective-C wrappers, XcodeGen project.yml, Podfile, CocoaPods static linking, BUILD_LIBRARY_FOR_DISTRIBUTION, XcodeProject MSBuild, `@objc`\u002F`[Export]` selector crashes, async completion handlers. DO NOT USE FOR: Android bindings, general MAUI apps, or NuGet packaging.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[769,770,772,773,776],{"name":17,"slug":18,"type":15},{"name":771,"slug":34,"type":15},"iOS",{"name":13,"slug":14,"type":15},{"name":774,"slug":775,"type":15},"Swift","swift",{"name":777,"slug":778,"type":15},"Xcode","xcode","2026-07-12T08:22:50.128667",{"slug":781,"name":781,"fn":782,"description":783,"org":784,"tags":785,"stars":25,"repoUrl":26,"updatedAt":795},"maui-accessibility","implement accessibility in .NET MAUI apps","Make .NET MAUI apps accessible with semantic properties, screen reader labels\u002Fhints, heading levels, focus, announcements, AutomationProperties, touch targets, and platform checks. USE FOR: accessibility audits, WCAG UI fixes, TalkBack\u002FVoiceOver\u002FNarrator behavior, SemanticProperties.Description\u002FHint\u002FHeadingLevel, SemanticScreenReader.Announce, SetSemanticFocus, avoiding redundant Label metadata, hiding decorative content with IsInAccessibleTree=false, and CollectionView row semantics. DO NOT USE FOR: general layout, UI automation only, or performance tuning.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[786,787,790,791,792],{"name":17,"slug":18,"type":15},{"name":788,"slug":789,"type":15},"Accessibility","accessibility",{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},{"name":793,"slug":794,"type":15},"WCAG","wcag","2026-07-12T08:22:17.823583",{"slug":797,"name":797,"fn":798,"description":799,"org":800,"tags":801,"stars":25,"repoUrl":26,"updatedAt":806},"maui-ai-debugging","debug .NET MAUI application issues","Legacy DevFlow debug skill. USE FOR: `maui-ai-debugging`, `maui devflow`, screenshots, visual tree, Blazor CDP, simulator\u002Femulator debugging. DO NOT USE FOR: setup, desktop automation, AppleScript, host `xdotool`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[802,803,804,805],{"name":17,"slug":18,"type":15},{"name":740,"slug":741,"type":15},{"name":13,"slug":14,"type":15},{"name":20,"slug":21,"type":15},"2026-07-12T08:22:52.634889",32,{"items":809,"total":963},[810,824,839,851,867,879,897,907,919,929,942,953],{"slug":811,"name":811,"fn":812,"description":813,"org":814,"tags":815,"stars":821,"repoUrl":822,"updatedAt":823},"multithreaded-task-migration","migrate MSBuild tasks to multithreaded mode","Guide for migrating MSBuild tasks to multithreaded mode support, including compatibility red-team review. Use this when converting tasks to thread-safe versions, implementing IMultiThreadableTask, adding TaskEnvironment support, or auditing migrations for behavioral compatibility.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[816,817,818],{"name":17,"slug":18,"type":15},{"name":759,"slug":760,"type":15},{"name":819,"slug":820,"type":15},"Performance","performance",5535,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fmsbuild","2026-07-22T05:37:33.965588",{"slug":825,"name":825,"fn":826,"description":827,"org":828,"tags":829,"stars":836,"repoUrl":837,"updatedAt":838},"analyzing-dotnet-performance","analyze .NET code for performance anti-patterns","Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and I\u002FO with tiered severity classification. Use when analyzing .NET code for optimization opportunities, reviewing hot paths, or auditing allocation-heavy patterns.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[830,831,834,835],{"name":17,"slug":18,"type":15},{"name":832,"slug":833,"type":15},"Code Analysis","code-analysis",{"name":740,"slug":741,"type":15},{"name":819,"slug":820,"type":15},4576,"https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills","2026-07-12T08:23:25.400375",{"slug":840,"name":840,"fn":841,"description":842,"org":843,"tags":844,"stars":836,"repoUrl":837,"updatedAt":850},"android-tombstone-symbolication","symbolicate .NET runtime frames in Android tombstones","Symbolicate the .NET runtime frames in an Android tombstone file. Extracts BuildIds and PC offsets from the native backtrace, downloads debug symbols from the Microsoft symbol server, and runs llvm-symbolizer to produce function names with source file and line numbers. USE FOR triaging a .NET MAUI or Mono Android app crash from a tombstone, resolving native backtrace frames in libmonosgen-2.0.so or libcoreclr.so to .NET runtime source code, or investigating SIGABRT, SIGSEGV, or other native signals originating from the .NET runtime on Android. DO NOT USE FOR pure Java\u002FKotlin crashes, managed .NET exceptions that are already captured in logcat, or iOS crash logs. INVOKES Symbolicate-Tombstone.ps1 script, llvm-symbolizer, Microsoft symbol server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[845,846,847,848],{"name":17,"slug":18,"type":15},{"name":711,"slug":32,"type":15},{"name":740,"slug":741,"type":15},{"name":849,"slug":37,"type":15},"Microsoft","2026-07-12T08:23:21.595572",{"slug":852,"name":852,"fn":853,"description":854,"org":855,"tags":856,"stars":836,"repoUrl":837,"updatedAt":866},"apple-crash-symbolication","symbolicate .NET runtime frames in crash logs","Symbolicate .NET runtime frames in Apple platform .ips crash logs (iOS, tvOS, Mac Catalyst, macOS). Extracts UUIDs and addresses from the native backtrace, locates dSYM debug symbols, and runs atos to produce function names with source file and line numbers. Automatically downloads .dwarf symbols from the Microsoft symbol server using Mach-O UUIDs. USE FOR triaging a .NET MAUI or Mono app crash from an .ips file on any Apple platform, resolving native backtrace frames in libcoreclr or libmonosgen-2.0 to .NET runtime source code, retrieving .ips crash logs from a connected iOS device or iPhone, or investigating EXC_CRASH, EXC_BAD_ACCESS, SIGABRT, or SIGSEGV originating from the .NET runtime. DO NOT USE FOR pure Swift\u002FObjective-C crashes with no .NET components, or Android tombstone files. INVOKES Symbolicate-Crash.ps1 script, atos, dwarfdump, idevicecrashreport.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[857,858,859,860,863],{"name":17,"slug":18,"type":15},{"name":740,"slug":741,"type":15},{"name":771,"slug":34,"type":15},{"name":861,"slug":862,"type":15},"macOS","macos",{"name":864,"slug":865,"type":15},"Observability","observability","2026-07-12T08:23:20.369986",{"slug":868,"name":868,"fn":869,"description":870,"org":871,"tags":872,"stars":836,"repoUrl":837,"updatedAt":878},"assertion-quality","evaluate assertion quality in test suites","Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull \u002F toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS\u002FJS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent \u002F writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns), fixing or rewriting assertions, or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[873,874,877],{"name":832,"slug":833,"type":15},{"name":875,"slug":876,"type":15},"QA","qa",{"name":23,"slug":24,"type":15},"2026-07-12T08:23:51.277743",{"slug":880,"name":880,"fn":881,"description":882,"org":883,"tags":884,"stars":836,"repoUrl":837,"updatedAt":896},"author-component","create and review Blazor components","Create or review Blazor components (.razor files) with correct architecture. USE FOR: writing new Blazor components that do NOT involve JavaScript interop, implementing parameters and EventCallback, RenderFragment slots, component lifecycle (OnInitializedAsync, OnParametersSet), async patterns, IAsyncDisposable, CancellationToken, CSS isolation, code-behind. DO NOT USE FOR: creating new projects (use create-blazor-project), JavaScript interop or calling browser APIs from Blazor (use use-js-interop), forms and validation (use collect-user-input), prerendering issues (use support-prerendering), HTTP data fetching patterns (use fetch-and-send-data), coordinating state between unrelated components (use coordinate-components).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[885,886,889,890,893],{"name":17,"slug":18,"type":15},{"name":887,"slug":888,"type":15},"Blazor","blazor",{"name":754,"slug":241,"type":15},{"name":891,"slug":892,"type":15},"UI Components","ui-components",{"name":894,"slug":895,"type":15},"Web Development","web-development","2026-07-15T06:03:29.216359",{"slug":898,"name":898,"fn":899,"description":900,"org":901,"tags":902,"stars":836,"repoUrl":837,"updatedAt":906},"binlog-failure-analysis","analyze MSBuild binary logs","Analyze MSBuild binary logs to diagnose build failures. USE FOR: build errors that are unclear from console output, diagnosing cascading failures across multi-project builds, tracing MSBuild target execution order, and generally any MSBuild build issues. Requires an existing .binlog file. DO NOT USE FOR: generating binlogs (use binlog-generation), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[903,904,905],{"name":832,"slug":833,"type":15},{"name":740,"slug":741,"type":15},{"name":849,"slug":37,"type":15},"2026-07-12T08:21:34.637923",{"slug":908,"name":908,"fn":909,"description":910,"org":911,"tags":912,"stars":836,"repoUrl":837,"updatedAt":918},"binlog-generation","generate MSBuild binary logs for diagnostics","Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding \u002Fbl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ \u002F .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[913,916,917],{"name":914,"slug":915,"type":15},"Build","build",{"name":740,"slug":741,"type":15},{"name":759,"slug":760,"type":15},"2026-07-19T05:38:19.340791",{"slug":920,"name":920,"fn":921,"description":922,"org":923,"tags":924,"stars":836,"repoUrl":837,"updatedAt":928},"build-parallelism","optimize MSBuild build parallelism","Diagnose and fix under-parallelized MSBuild builds. USE WHEN a multi-project solution build is slower than expected, doesn't speed up when you add cores, pegs a single core while others idle, or you want to know why `-m` isn't helping. Note: `\u002Fmaxcpucount` default is 1 (sequential) — always pass `-m` for parallel builds. Covers finding the critical path (longest serial ProjectReference chain), graph build (`\u002Fgraph`), BuildInParallel, and solution filters (`.slnf`). DO NOT USE FOR: single-project builds, incremental issues (use incremental-build), compilation slowness inside one project (use build-perf-diagnostics), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[925,926,927],{"name":17,"slug":18,"type":15},{"name":759,"slug":760,"type":15},{"name":819,"slug":820,"type":15},"2026-07-19T05:38:18.364937",{"slug":930,"name":930,"fn":931,"description":932,"org":933,"tags":934,"stars":836,"repoUrl":837,"updatedAt":941},"build-perf-baseline","establish and optimize build performance baselines","Establish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before\u002Fafter measurements (cold, warm, no-op scenarios), applying optimization strategies like MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[935,936,939,940],{"name":759,"slug":760,"type":15},{"name":937,"slug":938,"type":15},"Monitoring","monitoring",{"name":819,"slug":820,"type":15},{"name":23,"slug":24,"type":15},"2026-07-12T08:21:35.865649",{"slug":943,"name":943,"fn":944,"description":945,"org":946,"tags":947,"stars":836,"repoUrl":837,"updatedAt":952},"build-perf-diagnostics","diagnose MSBuild build performance bottlenecks","Diagnose MSBuild build performance bottlenecks using binary log analysis. USE FOR: identifying why builds are slow by analyzing binlog performance summaries, detecting ResolveAssemblyReference (RAR) taking >5s, Roslyn analyzers consuming >30% of Csc time, single targets dominating >50% of build time, node utilization below 80%, excessive Copy tasks, NuGet restore running every build. Covers timeline analysis, Target\u002FTask Performance Summary interpretation, and 7 common bottleneck categories. Use after build-perf-baseline has established measurements. DO NOT USE FOR: establishing initial baselines (use build-perf-baseline first), fixing incremental build issues (use incremental-build), parallelism tuning (use build-parallelism), non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[948,949,950,951],{"name":17,"slug":18,"type":15},{"name":740,"slug":741,"type":15},{"name":759,"slug":760,"type":15},{"name":819,"slug":820,"type":15},"2026-07-12T08:21:40.961722",{"slug":954,"name":954,"fn":955,"description":956,"org":957,"tags":958,"stars":836,"repoUrl":837,"updatedAt":962},"check-bin-obj-clash","detect MSBuild output path conflicts","Detects MSBuild projects with conflicting OutputPath or IntermediateOutputPath. USE FOR: builds failing with 'Cannot create a file when that file already exists', 'The process cannot access the file because it is being used by another process', intermittent build failures that succeed on retry, or missing\u002Foverwritten outputs in multi-project or multi-targeting builds where bin\u002Fobj (or project.assets.json) collide. Common causes: shared OutputPath, missing AppendTargetFrameworkToOutputPath, extra global properties (e.g. PublishReadyToRun), or SetTargetFramework on a ProjectReference to a single-targeting project. DO NOT USE FOR: file access errors unrelated to MSBuild (OS-level locking), single-project single-TFM builds, non-MSBuild build systems.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[959,960,961],{"name":740,"slug":741,"type":15},{"name":759,"slug":760,"type":15},{"name":875,"slug":876,"type":15},"2026-07-19T05:38:14.336279",144]