Skip to content

[Problem/Bug]: WebView2 not running when uap10:TrustLevel="appContainer" is set for WinUI3 packaged app #5320

@kristianpinke

Description

@kristianpinke

What happened?

WebView2 is not showing on UI when following is configure in Package.appxmanifest:

<Package
  ...
  xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
  ...>
  ...
  <Applications>
    <Application Id="App"
      Executable="$targetnametoken$.exe"
      EntryPoint="Windows.PartialTrustApplication"
      uap10:TrustLevel="appContainer"
      uap10:RuntimeBehavior="packagedClassicApp">
...

Importance

Blocking. My app's basic functions are not working due to this issue.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

1.0.2903.40

Framework

WinUI3/WinAppSDK

Operating System

Windows 11

OS Version

26100.4652

Repro steps

  1. Create WinUI Blank App (Packaged)
  2. Modify Package.appxmanifest setting values:
    EntryPoint="Windows.PartialTrustApplication"
    uap10:TrustLevel="appContainer"
    uap10:RuntimeBehavior="packagedClassicApp"
  3. Place WebView2 control on a page and set its Source

AR: Application runs without an error but no WebView2 control can be seen on UI

ER: Application runs and WebView2 is rendered on UI with

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions