-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Labels
Area-run-fileItems related to the "dotnet run <file>" effortItems related to the "dotnet run <file>" effort
Milestone
Description
Currently, C# script files require to have the '.cs' extension.
On Linux it is not required for scripts to have a specific extension. To the user there is little difference in invocation of a native binary or a script. It would be nice if C# scripts did not require an extension either.
Reproducer:
Create a script:
$ cat >program.cs <<EOF
#!/usr/bin/dotnet run
Console.WriteLine("Hello world");
EOF
$ chmod +x program.cs
Script execute with .cs
extension:
$ ./program.cs
Hello world
Script does not execute without .cs
extension:
$ mv program.cs program
$ ./program
Couldn't find a project to run. Ensure a project exists in /tmp, or pass the path to the project using --project.
Metadata
Metadata
Assignees
Labels
Area-run-fileItems related to the "dotnet run <file>" effortItems related to the "dotnet run <file>" effort