WebBrowser interop API how-to example code does not work in .NET 5.0
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- desktop, documentation
Research direction
Update dotnet-desktop-guide/framework/winforms/controls/implement-two-way-com-between-dhtml-and-client.md. First read the linked dotnet/winforms#4443 issue and compare its .NET 5.0 guidance with the existing .NET Framework 4.8 example. Done means the page warns about the incompatibility or provides an appropriately updated .NET 5.0 version.
Written by the indexing model from the issue text.
Description
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 toForm1's declaration, then annotateForm1withComDefaultInterface; or -
(b) extract
Testto a new type, then assign an instance of that type toObjectForScripting(instead of assigningthis).
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: c586d0c9-fb61-4fb5-6f7b-2d1a8abc0dd4
- Version Independent ID: 5e8ef638-ba4d-4b78-b9b4-79e4732b77c8
- Content: How to: Implement Two-Way Communication Between DHTML Code and Client Application Code - Windows Forms .NET Framework
- Content Source: dotnet-desktop-guide/framework/winforms/controls/implement-two-way-com-between-dhtml-and-client.md
- Product: dotnet-framework
- Technology: dotnet-winforms
- GitHub Login: @adegeo
- Microsoft Alias: adegeo
- Dominant language
- C#
- Stars
- 241
- Forks
- 192
- Avg merge
- 10h 23m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/docs-desktop
-
:watch: Not Triaged dotnet-target-version
Difficulty 1/5 Under an hour Newbie friendliness 84/100
dotnet/docs-desktop#2313 ·
Maintainers usually reply within 4 days
-
Kuzuberkcem116@comOpen:watch: Not Triaged dotnet-framework/svc wpf/subsvc
Difficulty 1/5 Under an hour Newbie friendliness 22/100
dotnet/docs-desktop#2296 ·
Maintainers usually reply within 4 days
-
:watch: Not Triaged dotnet-framework/svc wpf/subsvc
Difficulty 3/5 Half a day Newbie friendliness 22/100
dotnet/docs-desktop#2295 ·
Maintainers usually reply within 4 days
-
[EPIC] Additional migration efforts after the great mergeMay be free again @adegeo claimed this 572 days ago, and no pull request is open. Opendotnet-desktop/svc dotnet-framework/svc winforms/subsvc wpf/subsvc
dotnet/docs-desktop#2083 · 1 assignee ·
Maintainers usually reply within 4 days
-
How do you populate the WinForms Toolbox in .NET?Possibly taken @adegeo claimed this 672 days ago. Open:pushpin: seQUESTered doc-idea dotnet-desktop/svc winforms/subsvc
dotnet/docs-desktop#1994 · 1 comment · 1 assignee ·
Maintainers usually reply within 4 days
All issues in dotnet/docs-desktop
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
OpenTelemetryChatClient records gen_ai.response.finish_reasons as a JSON string instead of string[]Openarea-ai bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/extensions#7995 ·
Maintainers usually reply within 1 day
-
chore: remove stale IL3050/IL3053 workaround from the iOS samplePossibly taken A pull request linked to this issue is open or already merged. OpenState: Needs Discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-dotnet#6071 · 1 comment ·
Maintainers usually reply within 1 day
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
area/frontend type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
umbraco/Umbraco-CMS#24867 · 1 comment ·
Maintainers usually reply within 1 day