Skip to content

Support launching .NET apps (source and compiled) using dnx #49495

@DamianEdwards

Description

@DamianEdwards

Now that the dotnet dnx command and dnx script are in the SDK, we should update them to support launching .NET apps other than tools, including from source (project files or file-based apps), and assemblies. This makes dnx a universal launcher for .NET apps whether they be:

  • dnx MyApp.dll, dnx ../path/to/MyApp.dll
    Argument ends with ".dll"
    This would dispatch to dotnet MyApp.dll, dotnet ../path/to/MyApp.dll
  • dnx ProjectFile.csproj, dnx ../path/to/ProjectFile.csproj (and other known project file types)
    Argument ends with ".csproj", ".vbproj", ".fsproj"
    This would dispatch to dotnet run --project ProjectFile.csproj, dotnet run --project ../path/to/ProjectFile.csproj
  • dnx app.cs, dnx ../path/to/app.cs, dnx app (extensionless source file)
    Argument ends with ".cs", or is path to existing extensionless file
    This would dispatch to dotnet run app.cs, dotnet run ../path/to/app.cs, dotnet run app

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions