Let's use the following code for simulating the problem.
class Program
{
static void Main(string[] args)
{
foreach (var arg in args)
{
Console.WriteLine(arg);
}
}
}
I want to use dotnet watch -c release -- hello world but the output is:
-c
release
hello
world
The expected output:
hello
world
What is the correct syntax?
dotnet watchdoes not have-c|--configurationswitch/option (docs),dotnet runhas (docs).dotnet watchallows to specify the command to be watched (dotnet watch run) though passing-chas not worked for me (i.e.dotnet watch run -c release -- hello world) but passing the MSBuild property directly with--property:Configuration=RELEASEdid:Sample program used for tests: