question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't build any xaml islands app with 2.7.0-prerelease.210827001

See original GitHub issue

Describe the bug I upgraded a Win32 C++/WinRT app to WinUI 2.7.0-prerelease.210827001, now I get a cppwinrt error:

Rebuild started...
1>------ Rebuild All started: Project: Playground, Configuration: Debug Win32 ------
1>cppwinrt : error Type 'Microsoft.Web.WebView2.Core.CoreWebView2' could not be found
1> method: CoreWebView2
1> type: Microsoft.UI.Xaml.Controls.IWebView2
1> database: F:\xaml-islands\Playground\packages\Microsoft.UI.Xaml.2.7.0-prerelease.210827001\lib\uap10.0\Microsoft.UI.Xaml.winmd
1>F:\xaml-islands\Playground\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\Microsoft.Windows.CppWinRT.targets(736,9): error MSB3073: The command ""F:\xaml-islands\Playground\packages\Microsoft.Windows.CppWinRT.2.0.210825.3\build\native\..\..\bin\"cppwinrt @"Debug\Playground.vcxproj.cppwinrt_ref.rsp"" exited with code 1.
1>Done building project "Playground.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Steps to reproduce the bug Create C++/WinRT app, reference latest winui nuget, build.

Note this does not require me to use WebView2 in my project - the build error happens even before any of my code gets compiled.

Version Info

NuGet package version: Microsoft.UI.Xaml 2.7.0-prerelease.210827001 latest cppwinrt version: 2.0.210825.3 mux brought in webview2 pkg: 1.0.955-prerelease

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:29 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
champniccommented, Jul 25, 2022

Thanks @sylveon! I wasn’t trying to suggest using a prerelease package long-term, but just wanted info that would help us narrow down when the issue was introduced. At this point my best guess is that there is some difference between the release and prerelease versions of the WebView2 SDKs that is causing this - I’ll take a look at what the differences are.

1reaction
jevansakscommented, Sep 28, 2021

Now that the property is available, we should just add that property to the WinUI2 nupkg targets. Something like:

<WebView2UseWinRT Condition="'$(WebView2UseWinRT)' ==''">true</WebView2UseWinRT>

@asklar can you hack your WinUI2 targets locally and see if that would address it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.UI.Xaml 2.7.0-prerelease.210827001
Version Downloads Last updated 2.8.5 15,560 a month ago 2.8.4 40,563 3 months ago 2.8.3 11,225 4 months ago
Read more >
Using XAML Islands on Windows 10 19H1: fixing the " ...
The first way to solve this problem is to package the application as MSIX and use, as target SDK, the 19H1 one. This...
Read more >
WinRT WebView2注入宿主对象供JS使用【失败记】
同样的问题也报告在 Can't build any xaml islands app with 2.7.0-prerelease.210827001 #1716 ,又有 Can't build any xaml islands app with ...
Read more >
How to use SwapChainPanel in XAML Islands - wpf
I have followed the instructions here to create a sample app that uses XAML Islands to add controls like InkCanvas and CalendarView ...
Read more >
Tour what's new for XAML tools & Xaml Islands in ... - YouTube
Announcing .NET Core 3.0: https://aka.ms/dotnetcore3 #dotNETConf In this session we'll take a tour through XAML tooling for WPF & UWP ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found