From d8b352c2e62b5d86f98664635801c9a021faecff Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 5 Sep 2022 10:40:00 +0200 Subject: [PATCH] C#: Use `-p:` instead of `/p:` with `dotnet` Makes a difference for `dotnet run` where the option will otherwise be considered an argument to the program that is run. --- csharp/tools/tracing-config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/tools/tracing-config.lua b/csharp/tools/tracing-config.lua index ea6c1daa717..b34549e73fd 100644 --- a/csharp/tools/tracing-config.lua +++ b/csharp/tools/tracing-config.lua @@ -16,7 +16,7 @@ function RegisterExtractorPack(id) -- For now, parse the command line as follows: -- Everything that starts with `-` (or `/`) will be ignored. -- The first non-option argument is treated as the command. - -- if that's `build`, we append `/p:UseSharedCompilation=false` to the command line, + -- if that's `build`, we append `-p:UseSharedCompilation=false` to the command line, -- otherwise we do nothing. local match = false local needsSeparator = false; @@ -37,7 +37,7 @@ function RegisterExtractorPack(id) break end if arg == 'run' then - -- for `dotnet run`, we need to make sure that `/p:UseSharedCompilation=false` is + -- for `dotnet run`, we need to make sure that `-p:UseSharedCompilation=false` is -- not passed in as an argument to the program that is run match = true needsSeparator = true @@ -49,7 +49,7 @@ function RegisterExtractorPack(id) end end if match then - local injections = { '/p:UseSharedCompilation=false' } + local injections = { '-p:UseSharedCompilation=false' } if needsSeparator then table.insert(injections, '--') end