forked from microsoft/WindowsDeveloperConfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
15 lines (13 loc) · 633 Bytes
/
Copy pathProgram.cs
File metadata and controls
15 lines (13 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Hello-world probe for the WinForms flow.
//
// We don't show a window (CI runners are headless for interactive UI), but we
// *do* construct a WinForms control and read back its properties — this forces
// the Windows Forms assemblies and the Windows Desktop runtime to actually
// load. If the .NET SDK install was incomplete (e.g. missing Desktop targeting
// pack), the `new Form()` call below would fail at runtime and the harness
// would flag the flow broken.
using System;
using System.Windows.Forms;
using var form = new Form { Text = "hello-winforms" };
Console.WriteLine($"WinForms: {form.Text}");
form.ShowDialog();