Skip to content

Support multiple files in dotnet run #48174

Open
@jaredpar

Description

@jaredpar

Consider the following directory layout:

- app\
  - file.cs
  - util.cs

When executing dotnet run file.cs the code inside file.cs should be able to use types / members in util.cs. Specifically:

// file.cs
Console.WriteLine(Util.GetMessage());

// util.cs
static class Util
{
  public static string GetMessage() => "Hello World";
}

When executing dotnet run file.cs this should execute and produce the output "Hello World".

Metadata

Metadata

Assignees

Labels

Area-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