<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>suusanex</author_name>
  <author_url>https://blog.hatena.ne.jp/suusanex/</author_url>
  <blog_title>新しもの好きプログラマの耳より情報ブログ</blog_title>
  <blog_url>https://suusanex.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>概要 WPFの画面にWebView2を実装。デバッグ実行すると問題ないが、実行環境にインストールすると表示されない・・・？ そういう場合、WebView2はexeがあるフォルダへの書き込み権限を要求するという特徴のせいかもしれません。その説明と解決策です。 最初に結論まとめ WebView2のインスタンスに、下記※1のように設定して、確実に書き込み権限があるフォルダを使わせるようにしましょう。 処理に時間がかかること、処理が終わるまでWebView2を使用できない（Sourceを与えたりしてはいけない）という点に注意です。 ※1 //xaml側でName=&quot;webView&quot;と定義している前提で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsuusanex.hatenablog.jp%2Fentry%2F2024%2F03%2F12%2F170412&quot; title=&quot;WPFのWebView2が実行環境で表示されない場合、exeがあるフォルダに実行ユーザーの書き込み権限が無いのが問題かも - 新しもの好きプログラマの耳より情報ブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-12 17:04:12</published>
  <title>WPFのWebView2が実行環境で表示されない場合、exeがあるフォルダに実行ユーザーの書き込み権限が無いのが問題かも</title>
  <type>rich</type>
  <url>https://suusanex.hatenablog.jp/entry/2024/03/12/170412</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
