You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet run --project <pathToCsprojFile> -p:Version=1.0.0 -- Parameter1
The project which is started by the dotnet run command should contain the following file:
using System;
namespace Test
{
internal class ListProgramArguments
{
internal static void Main(string[] args)
{
Console.WriteLine($"Args provided: {string.Join(", ", args)}");
}
}
}
If the dotnet run command is executed via .NET sdk 5.0.402 the output is wrong:
Args provided: Version=1.0.0, Parameter1
If it is run with .NET 6.0.100-rc.2.21505.57 it's correct:
Args provided: Parameter1
To me it looks like this behavior should be ported to .NET 5. The documentation https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-run describes that this should work and since it works in .NET 6 I wondered if that was caused by a forgotten backport or if it was a conscious decision because of some breaking change concerns or something like that.