Help text generation throws InvalidOperationException on Mono
See original GitHub issueDescribe the bug upgrade from 2.2.5 -> 2.3 breaks application
To Reproduce Steps to reproduce the behavior:
- Using this version of the library ‘2.2.5.’
- Run this code ‘…’
- With these arguments ‘…’
- See error
Expected behavior Upwards compatibility
Screenshots
Unhandled Exception:
System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams.
at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00060] in <23340a11bb41423aa895298bf881ed68>:0
at System.Diagnostics.Process.Start () [0x00032] in <23340a11bb41423aa895298bf881ed68>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
at McMaster.Extensions.CommandLineUtils.Pager.CreateWriter () [0x00064] in <5f42c33014224597b1fabe346c86217b>:0
at System.Lazy1[T].CreateValue () [0x00081] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.Lazy
1[T].LazyInitValue () [0x00080] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.Lazy1[T].get_Value () [0x0003a] in <98fac219bd4e453693d76fda7bd96ab0>:0 at McMaster.Extensions.CommandLineUtils.Pager.get_Writer () [0x00013] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ShowHelp (System.Boolean usePager) [0x00041] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ShowHelp () [0x00000] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessOption () [0x00246] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessNext () [0x00033] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.Process () [0x00015] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Parse (System.String[] args) [0x00014] in <5f42c33014224597b1fabe346c86217b>:0 at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00000] in <5f42c33014224597b1fabe346c86217b>:0 at ClienteleCLI.Program.Main (System.String[] args) [0x00130] in <27420bcba69640678847b326b3cb6ebd>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: The Process object must have the UseShellExecute property set to false in order to redirect IO streams. at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00060] in <23340a11bb41423aa895298bf881ed68>:0 at System.Diagnostics.Process.Start () [0x00032] in <23340a11bb41423aa895298bf881ed68>:0 at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() at McMaster.Extensions.CommandLineUtils.Pager.CreateWriter () [0x00064] in <5f42c33014224597b1fabe346c86217b>:0 at System.Lazy
1[T].CreateValue () [0x00081] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.Lazy1[T].LazyInitValue () [0x00080] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.Lazy
1[T].get_Value () [0x0003a] in <98fac219bd4e453693d76fda7bd96ab0>:0
at McMaster.Extensions.CommandLineUtils.Pager.get_Writer () [0x00013] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ShowHelp (System.Boolean usePager) [0x00041] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ShowHelp () [0x00000] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessOption () [0x00246] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.ProcessNext () [0x00033] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineProcessor.Process () [0x00015] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Parse (System.String[] args) [0x00014] in <5f42c33014224597b1fabe346c86217b>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00000] in <5f42c33014224597b1fabe346c86217b>:0
at ClienteleCLI.Program.Main (System.String[] args) [0x00130] in <27420bcba69640678847b326b3cb6ebd>:0
Additional context Macos
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
@Jay-Jay-D can you open a new issue and describe steps to reproduce the problem?
Hey Nate, First of all, thank you very much for maintaining this library!
I’m having the
System.InvalidOperationException
issue in using the version 2.3.1-build.475 in Mono 5.14.0.177