CompilerInvocations and parsing command line executable
See original GitHub issueHey,
I have found that the command line formatting and parsing in CompilerInvocations is very brittle. On my machine for example I get the following on a dotnet net5.0 project:
C:\Program Files\dotnet\dotnet.exe exec "C:\Program Files\dotnet\sdk\5.0.100-rc.2.20479.15\Roslyn\bincore\csc.dll" /noconfig /unsafe- /checked- /nowarn:1701,1702,CS1591,1701,1702 /fullpaths ....
First, because the removal of csc.dll doesn’t work (it matches css.dll
with a space at the end, likely it works on Linux but not on Windows)
The second problem more annoying is that the command C:\Program Files\dotnet\dotnet.exe exec
is not parse-able easily due to the lack of embraced by "
. I’m worried that it is buried into msbuild logging and something we can’t change…
Any ideas?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
clang::CompilerInvocation Class Reference
Check that Args can be parsed and re-serialized without change, emiting diagnostics for any differences. This check is only suitable for command-lines that...
Read more >Getting Started with the Swift Frontend: Lexing & Parsing
performFrontend parses command-line arguments to determine the FrontendOptions::RequestedAction , by using the CompilerInvocation::parseArgs ...
Read more >Does the Windows "cmd.exe" parse arguments differently?
Any application can parse the command line in any way it sees fit. Most applications use the C runtime library parser, but there...
Read more >class CompilerInvocation: LLVM/Clang 15.x documentation
Parse command line options that map to LangOptions. Declared at: clang/include/clang/Frontend/CompilerInvocation.h:249. Parameters. clang::LangOptions& Opts ...
Read more >Solved: Is there a package for parsing command line flags?
I'm building an application which runs as a standalone executable. I want to optionally start the program with command line arguments, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@xoofx Well the aim is to run the application as a .NET Core application and it’s only possible since .NET Core 3.1. But sure the lib could target
netcoreapp2.1
if you feel like it would bring more compatibility.Lib =>
net472;netcoreapp2.1
// To match exactly MsBuild App =>net472;netcoreapp3.1
// WPF is only supported since 3.1Yeah,
netcoreapp2.1
only for the Lib, for the App, you can use whatever is more suitable