dotnet / dotnet/sdk

`dotnet run --tl:on` interpreted as application argument

Open
#43,207 5 comments 0 reactions 0 assignees View on GitHub
Area-Run untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug
`dotnet run`'s `--tl` flag is interpreted as application arguments.

### To Reproduce
```csharp
// Program.cs
Console.WriteLine(args.Length);
Console.WriteLine(args[0]);
Console.WriteLine(args[1]);
```

Then run the project using following command:
```bash
$ dotnet run --tl:on -- foo
2
--tl:on
foo
```

### Exceptions (if any)

None

### Further technical details

```text
$ dotnet --info
.NET SDK:
Version: 8.0.401
Commit: 811edcc344
Workload version: 8.0.400-manifests.b6724b7a
MSBuild version: 17.11.4+37eb419ad

Runtime Environment:
OS Name: debian
OS Version: 12
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.401/

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.

Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5

.NET SDKs installed:
8.0.401 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.