Skip to content

[Application Builder] Establish the WinForms host and application lifetime #14940

Description

@KlausLoeffelmann

User story

As a WinForms developer, I want a first-class application builder and host lifetime so that startup, the UI thread, application context, and graceful shutdown follow modern .NET conventions without hiding WinForms' desktop semantics.

Rationale and user benefit

This is the foundation for the remaining Application Builder work. It should align with the Generic Host and existing proposal #11415 while retaining predictable Application.Run, ApplicationContext, synchronization-context, exception, and shutdown behavior.

Scope boundary

Own the core builder, built application, options, host/lifetime integration, UI-thread startup, application context, startup-form activation, and graceful shutdown contracts. Coordinate public contracts with the DI/scopes and services/configuration stories, but do not implement their internal features here.

Acceptance criteria

  • C# and VB can configure, build, run, and stop the same application model.
  • Startup form and custom ApplicationContext scenarios are supported.
  • UI-thread and synchronization-context behavior is explicit and deterministic.
  • Host and WinForms shutdown signals propagate correctly in both directions.
  • Existing Application.Run applications remain supported and source compatible.
  • The relationship with Add WindowsFormsLifetime extensions to the .NET Generic Host #11415 is resolved without competing lifetime models.

Definition of Done

  • API shape and ownership boundaries are reviewed.
  • Runtime implementation, automated tests, samples, diagnostics, and compatibility documentation are complete.
  • Startup/shutdown failure paths, resource cleanup, performance, and accessibility implications are validated.
  • CI passes on supported architectures.

Parallelization

This is foundation stream A. Stabilize the minimum shared contracts early so streams B and C can work against them without editing the same implementation areas.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Review IssueIssue content and decomposition require team review and may be iterated

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions