Skip to content

Add support for dotnet file.cs (without explicit run subcommand) #48387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jjonescz
Copy link
Member

No description provided.

@ghost ghost added Area-CLI untriaged Request triage from a team member labels Apr 11, 2025
@jjonescz jjonescz added Area-run-file Items related to the "dotnet run <file>" effort and removed Area-CLI labels Apr 11, 2025
@vrubleg
Copy link

vrubleg commented May 25, 2025

Please make sure that .csx file extension is also allowed. The .csx file extension was used for C# scripts for ages. It was possible to execute those by csi.exe from the MSBuild distribution, and dotnet run looks like a great way to move forward.

Having a separate extension makes clear that it's the entry point and can be executed directly. Some people might even register .csx to be executed directly without prepending dotnet run (that is possible to do with shebang on Linux).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants