MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Using C#/WinRT is not working with WinUI3

Open
#3,017 4 comments 0 reactions 1 assignee View on GitHub

@lflores-ms is already working on this.

Since Nov 7, 2023.

bug
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
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.