Skip to content

[Feature] Proposing an option to include other C# source files for dotnet run app.cs #49193

@egvijayanand

Description

@egvijayanand

Is your feature request related to a problem? Please describe.

I would suggest adding another directive along with the sdk, property, and package to reference other C# source files as mentioned below.

The proposed #:include directive would add multiple C# source files to the compilation unit.

The file provided as a parameter to the dotnet run command would be the entry point, and other files are supporting files.

Describe the solution you'd like

The source file path can be mentioned as an absolute path or a relative path to the entry file.

#:include Foo.cs

// Other statements

Additional context

dotnet run app.cs CLI experience

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-CLIArea-run-fileItems related to the "dotnet run <file>" effortuntriagedRequest triage from a team member

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions