MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Using C#/WinRT is not working with WinUI3
@lflores-ms is already working on this.
Since Nov 7, 2023.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
Following instructions in https://github.com/MicrosoftEdge/WebView2Feedback/issues/2529#issuecomment-1164508491 for WinUI3 project made in https://github.com/krschau/WinUI-WebView2-Samples/commits/master/NativeWebWinUI3App, I cannot reference the adapter which references the C#/WinRT project because compiler complains that C#/WinRT project is not compatible with WinUI3 project.
Version
SDK: WinAppSDK 1.2.221116.1
Runtime:
Framework: WinAppSDK/WinUI3
OS: Win11
Repro Steps
Follow the steps in https://github.com/MicrosoftEdge/WebView2Feedback/issues/2529#issuecomment-1164508491 to create a C#/WinRT project and reference it in the WinAppSDK project from https://github.com/krschau/WinUI-WebView2-Samples/commits/master/NativeWebWinUI3App.
Screenshots
FYI: I have renamed the WinUI3 project to AccessC#APIInJS, C++/WinRT Adapter to NativeAdapter and C#/WinRT project to NativeAPIs

Contributor guide
No contributing guide indexed for this repository
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.
Assessment
This issue has not been assessed yet.