[Bug] OpenLinuxBrowser() fails when executed in a .NET Framework app running in mono #5075
Description
Library version used
4.64
.NET version
.NET Framework
Scenario
Other - please specify
Is this a new or an existing app?
None
Issue description and reproduction steps
ProcessStartInfo.UseShellExecute
's default value is different in .NET Core and .NET Framework (false and true, respectively). UseShellExecute=true
is incompatible with the ProcessStartInfo.RedirectStandard*
flags. OpenLinuxBrowser()
sets the redirection flags to true when launching the browser process but does not explicitly set UseShellExecute
. This causes the Process.Start
call to fail when run in a .NET Framework process like mono.
I encountered this issue when trying to use Azure Artifacts Credential Provider to authenticate with a vcpkg NuGet binary cache. vcpkg uses mono to run the .NET framework build of NuGet.exe on Linux. I've confirmed that adding UseShellExecute=false
fixes the problem.
Relevant code snippets
No response
Expected behavior
No response
Identity provider
Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)
Regression
No response
Solution and workarounds
No response