Skip to content

Commit 9a2282c

Browse files
authored
Update plugin CanShowDialog info (#3477)
1 parent 418118c commit 9a2282c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/reference/extensibility/NuGet-Cross-Platform-Authentication-Plugin.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,14 @@ The following table summarizes how the plugin should behave for all combinations
5858

5959
| IsNonInteractive | CanShowDialog | Plugin behavior |
6060
| ---------------- | ------------- | --------------- |
61-
| true | true | The IsNonInteractive switch takes precedence over the dialog switch. The plugin is not allowed to pop a dialog. This combination is only valid for .NET Framework plugins |
62-
| true | false | The IsNonInteractive switch takes precedence over the dialog switch. The plugin is not allowed to block. This combination is only valid for .NET Core plugins |
63-
| false | true | The plugin should show a dialog. This combination is only valid for .NET Framework plugins |
64-
| false | false | The plugin should/can not show a dialog. The plugin should use device flow to authenticate by logging an instruction message via the logger. This combination is only valid for .NET Core plugins |
61+
| true | true | The IsNonInteractive switch takes precedence over the dialog switch. The plugin is not allowed to block. |
62+
| true | false | The IsNonInteractive switch takes precedence over the dialog switch. The plugin is not allowed to block. |
63+
| false | true | The plugin can show a dialog if required. For example, interactive login, or account selection. |
64+
| false | false | The plugin should/can not show a dialog. The plugin should use device flow to authenticate by logging an instruction message via the logger. |
65+
66+
Prior to [NuGet 7.0](../../release-notes/NuGet-7.0.md), NuGet would always set `CanShowDialog` to false on the dotnet CLI, and true for MSBuild restore.
67+
From 7.0, NuGet will always set `CanShowDialog` to true, but plugins should still detect when graphical interfaces are not available.
68+
For example when running on Linux over an SSH connection without X forwarding, or a PowerShell remote session.
6569

6670
Please refer to the following specs before writing a plugin.
6771

0 commit comments

Comments
 (0)