MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: Publishing with WPF and self-contained includes the native_uap Core dll

Open
#5,074 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

Using a command line such as

msbuild src\Cms.Wpf\Cms.Wpf.sln /target:Restore;WapCms:Publish /bl /p:Configuration=dev /p:SelfContained=true /p:AppxBundle=Never /p:NoRestore=true

For a .net 9 WPF app and an wapproj results in the native_uap dll from runtimes\win-x64\native_uap, Microsoft.Web.WebView2.Core.dll being set to CopyLocal=True and included in the msix. This will fail to load. Workaround is to add to the wapproj

  <PropertyGroup>
	  <WebView2UseWinRT>False</WebView2UseWinRT>
  </PropertyGroup>
Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

1.0.2957.106

SDK Version

1.0.2957.106

Framework

WPF

Operating System

Windows 11

OS Version

26100

Repro steps

As per the description.

Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Yes, worked with .net 8 and a previous version

Last working version (if regression)

1.0.1722.45

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.