WebBrowser interop API how-to example code does not work in .NET 5.0

オープン
#169 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
38/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp

調査の方向性

dotnet-desktop-guide/framework/winforms/controls/implement-two-way-com-between-dhtml-and-client.md を更新します。まず、リンクされている issue dotnet/winforms#4443 を読み、その .NET 5.0 向けのガイダンスを既存の .NET Framework 4.8 の例と比較します。ページが非互換性について警告するか、適切に更新された .NET 5.0 バージョンを提供していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

doc-bug dotnet-framework/svc okr-health okr-quality Pri2 winforms/subsvc

This how-to contains example code that worked in .NET Core 3.1 but no longer works in .NET 5.0.

See dotnet/winforms#4443 for details.

I recognize this how-to page is only for .NET Framework 4.8, but there is no other version of this how-to, and WebBrowser is a supported API of both .NET Core 3.1 and .NET 5.0.

Please consider either (a) adding a "note" element in this how-to with a warning and explanation of the issue for .NET 5.0 or (b) create and appropriately update a copy of this how-to for .NET 5.0.

If it's useful to summarize here, the correct code for .NET 5.0 should either:

  • (a) define an interface containing the signature of Test, add that interface to Form1's declaration, then annotate Form1 with ComDefaultInterface; or

  • (b) extract Test to a new type, then assign an instance of that type to ObjectForScripting (instead of assigning this).


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

主要言語
C#
スター
241
フォーク
192
平均マージ
10時間 23分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/docs-desktop のほかの issue

dotnet/docs-desktop の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。