microsoft / microsoft/microsoft-ui-xaml
Is it possible to detect Xaml root element type and idl type mismatch?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
I am creating a `ResourceDictionary` with code-behind to be able to use `x:Bind`, so I created it with the `UserControl` file template, change the xaml root element to `ResourceDictionary`, then I build the project, and it builds.
Later I realized, I forgot to also change the idl type to `ResourceDictionary`.
My question is is there any possibility to detect such type mismatch?
### Why is this important?
Saves time. Because editing one single `idl` file will require the whole project rebuild, which is exremely time-consuming for C++ project.
### Steps to reproduce the bug
As described above
### Actual behavior
_No response_
### Expected behavior
_No response_
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.7.3: 1.7.250606001
### Windows version
Windows 11 (24H2): Build 26100
### Additional context
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is identified in the issue. Start by reproducing the UserControl-template scenario in a WinUI 3 project: change the XAML root to ResourceDictionary but leave the IDL type unchanged, then build. Done means the mismatch is detected and reported before the costly C++ project rebuild.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100