Bug: Can't bind to ImmutableArray when using Native AOT
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 665
- Forks
- 134
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
Description
If you try to initialize the array with collection expression you get an unhandled win32 exception. If you try with a Builder, you get an ArgumentException and a an additional message saying "WinRT information: Argument 'source' is not a supported vector."
Steps To Reproduce
Set PublishAot to true, create an ImmutableArray and bind it.
Expected Behavior
To work.
Version Info
CsWinRT 2.1.3
.NET SDK 10.0.302
Windows SDK 26100.8249
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
Start with the linked IArrayRepro repository and reproduce the collection-expression and Builder cases with PublishAot set to true. Investigate the binding path for ImmutableArray under CsWinRT 2.1.3; done means both initialization approaches bind without the unhandled Win32 exception or the unsupported-vector ArgumentException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100