0

I'm learning C#(WPF) recently and want to open a website through webview2, my code works fine on my PC, but after I publish my project and run it on another PC, it didn't work,the webview2 control is totally blank!I have installed .Net framework required to the second PC. Why so? What have I done wrong? here is my xaml code:

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <wv2:WebView2 Name="webView" Source="http://coinlist.co/login"></wv2:WebView2>
        <Button Grid.Row="1" VerticalAlignment="Bottom" Click="Button_Click">naviagte</Button>
        <TextBox Grid.Row="2" Name="cl_url">ss</TextBox>
       
    </Grid>

enter image description here

  • You need the `WebView2 Runtime` installed on the other computer: https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section – Poul Bak Jan 15 '22 at 14:16
  • The first part of this [post](https://stackoverflow.com/questions/70625883/webview2-vb-net-cant-get-webpage-to-load/70645764#70645764) may be helpful. – user9938 Jan 15 '22 at 15:00
  • @PoulBak got it,thanks – peterchen145 Jan 15 '22 at 16:03

0 Answers0