I'm working on this official tutorial: Getting started with WebView2 in WPF (Preview).
- Have installed
Microsoft Edge (Chromium) Canary channelon myWindows 10 pro -ver 1903. - Have created a
.NET Core 3.1 - WPFproject on latest versionVS2019 - ver16.6.3. - Have installed the Nuget package Microsoft.Web.WebView2 -Version 0.9.538.
But, per instructions in step 3 of the tutorial, when I add namespace xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf" in <Window/> tag of MainWindow.xaml, and build (F5) the app, I get the following error at line using Microsoft.Web.WebView2.Wpf; of the MainWindow.g.cs file:
Error:
Error CS0234 The type or namespace name 'Web' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
MainWindow.xaml:
<Window x:Class="WpfWebView2TEST.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</Window>
Question: What may be a cause of the error and how can it be resoled?
