For whatever reason, when I try to call a C# program I'm writing, and I try to pass two arguments with '--' in the command line, PowerShell doesn't call the program with my command line.
For instance, I'm providing the command line:
.\abc.exe foo.txt -- bar --
When I call this, the C# program's main only gets the command line arguments:
foo.txt bar --
instead of
foo.txt -- bar --
as would be expected.
Why would this be happening?
BTW, if I call it as:
.\abc.exe foo.txt '--' bar '--'
it works as expected.
Also, calling it as:
& .\abc.exe foo.txt -- bar --
Doesn't seem to help.
My reason for thinking this is a PowerShell weirdness is that if I run the same command line from CMD.EXE, everything works as expected.