Skip to content

winapp new: next-step hint for single-file templates should be winapp run <name>.cs #1107

Closed

Description

Summary

After scaffolding a single-file (.NET file-based app) template, winapp new prints a next step that doesn't work:

Next: cd "MyApp" then winapp run

winapp run only enters single-file mode for an explicit .cs path. Run from the directory, it falls back to folder mode and fails with Manifest file not found. The command that works is winapp run MyApp.cs (or dotnet run MyApp.cs).

The first single-file template in the Windows App SDK pack is reactor-singlefile (microsoft/WindowsAppSDK#6844), so this path is new.

Repro

  • winapp 0.7.0, Developer Mode on
  • Template pack built from microsoft/WindowsAppSDK main (reactor-singlefile isn't in a published pack yet)
winapp new -t reactor-singlefile -n MyApp
cd MyApp
winapp run           # Manifest file not found
winapp run MyApp.cs  # launches packaged

The hint logic in NewCommand.WriteSuccess is unchanged on main, so 0.7.1 and main behave the same.

Suggested fix

NewCommand.WriteSuccess (src/winapp-CLI/WinApp.Cli/Commands/NewCommand.cs) already chooses the next step from template tags (HasTag("Library"), HasTag("Test")). HasTag reads the dotnet new list Tags column, and reactor-singlefile carries the SingleFile classification, so one more branch covers it:

else if (entry.HasTag("SingleFile"))
{
    ansiConsole.MarkupLineInterpolated($"{UiSymbols.Next} Next: [blue]cd \"{relative}\"[/] then [blue]winapp run {name}.cs[/].");
}

Related: #1077 (icons on single-file apps).

Activity

  1. added a commit that references this issue on Oct 16, 2026
    3229f24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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