We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally asked by @asklar here: microsoft/microsoft-ui-xaml#5793
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
This works in a uwp cppwinrt app, but for a regular win32 app, something is not passing the webview2 winmd file to cppwinrt
The problem seems to come from the webview2 pkg. In \packages\Microsoft.Web.WebView2.1.0.955-prerelease\build\Common.targets, it says:
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'UAP'"> <Reference Include="$(MSBuildThisFileDirectory)..\lib\Microsoft.Web.WebView2.Core.winmd"> <Implementation>Microsoft.Web.WebView2.Core.dll</Implementation> </Reference> <ReferenceCopyLocalPaths Include="$(MSBuildThisFileDirectory)..\runtimes\win-$(EffectivePlatform)\native_uap\Microsoft.Web.WebView2.Core.dll" /> <SDKReference Include="Microsoft.VCLibs.Desktop, Version=14.0"/> </ItemGroup>
However this won't be evaluated for non-UWP apps like win32 xaml islands apps.
Putting this in the xaml islands project seems to get it building:
<PropertyGroup> <EffectivePlatform>$(Platform)</EffectivePlatform> <EffectivePlatform Condition="'$(Platform)' == 'Win32'">x86</EffectivePlatform> </PropertyGroup> <ItemGroup> <Reference Include="packages\Microsoft.Web.WebView2.1.0.955-prerelease\lib\Microsoft.Web.WebView2.Core.winmd"> <Implementation>Microsoft.Web.WebView2.Core.dll</Implementation> </Reference> <ReferenceCopyLocalPaths Include="packages\Microsoft.Web.WebView2.1.0.955-prerelease\runtimes\win-$(EffectivePlatform)\native_uap\Microsoft.Web.WebView2.Core.dll" /> </ItemGroup>
AB#35837927
The text was updated successfully, but these errors were encountered:
This should be working in SDK 1.0.1018-prerelease. Thanks!
Sorry, something went wrong.
This is still reproing for me on 1.0.1018-prerelease
make sure your project sets the property: microsoft/microsoft-ui-xaml#5793 (comment)
(newer versions of the winui package will set this property for you)
No branches or pull requests
Originally asked by @asklar here: microsoft/microsoft-ui-xaml#5793
Describe the bug
I upgraded a Win32 C++/WinRT app to WinUI 2.7.0-prerelease.210827001, now I get a cppwinrt error:
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
This works in a uwp cppwinrt app, but for a regular win32 app, something is not passing the webview2 winmd file to cppwinrt
The problem seems to come from the webview2 pkg.
In \packages\Microsoft.Web.WebView2.1.0.955-prerelease\build\Common.targets, it says:
However this won't be evaluated for non-UWP apps like win32 xaml islands apps.
Putting this in the xaml islands project seems to get it building:
AB#35837927
The text was updated successfully, but these errors were encountered: