Skip to content

Please add support to load other files #49414

Closed as duplicate of#48174
Closed as duplicate of#48174
@charring

Description

@charring

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

DRY code requires code reuse. I make extensive use of this in C# scripting.

Describe the solution you'd like

I've been using dotnet-script for several years for both unit testing code and for creating small utilities. Being able to load scripts (with "#load - see below) from other scripts is a core feature for keeping my code DRY. It would be a knock against "dotnet run" if a comparable syntax was not available.

I propose "#:load file.cs"

Additional context

It's just a preprocessor - not a change to the C# syntax. Just like the others being added.

https://github.com/dotnet-script/dotnet-script#consuming-a-script-package

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions