I've found that the native command line parser used by .NET console apps serves my needs well, especially how it interprets text enclosed within quotes as a single argument. Is it possible to make a call to this parser directly?
Asked
Active
Viewed 232 times
-1
-
2Command line parsing actually tends to be a horrific mess because different OSes have different views on who should be doing the parsing (the OS itself? The shell? The application? An unholy mix?) so be careful what you ask for. [Then there's this.](https://stackoverflow.com/q/298830/4137916). – Jeroen Mostert Aug 17 '20 at 19:28
2 Answers
1
I think you are looking for System.CommandLine
Please check this article that talks about the System.CommandLine architecture. https://learn.microsoft.com/en-us/archive/msdn-magazine/2019/march/net-parse-the-command-line-with-system-commandline
The System.CommandLine sources are open and available at: https://github.com/dotnet/command-line-api

vvg
- 1,010
- 7
- 25
0
If I'm not wrong I think there a batch file that you can call
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
You can call the first for 32 bits and the second for 64 bits, after calling this batch file you'll be able to use the compiler directly.

Rodrigo Santos
- 99
- 1
- 6