Skip to content

Replace .sln with .slnx; drop IDE-template scaffolding#3

Open
andyleejordan wants to merge 1 commit intotig:terminal_gui_v2from
PowerShell:andyjordan/slnx-and-vscode-debug
Open

Replace .sln with .slnx; drop IDE-template scaffolding#3
andyleejordan wants to merge 1 commit intotig:terminal_gui_v2from
PowerShell:andyjordan/slnx-and-vscode-debug

Conversation

@andyleejordan
Copy link
Copy Markdown

Targets your PR PowerShell#267 (PowerShell/ConsoleGuiTools).

Why

CI on PowerShell#267 was failing in the Test task because the tracked GraphicalTools.sln had stale ProjectReferences to local Terminal.Gui sources at ..\gui-cs\Terminal.Gui\... that don't exist on the runner. dotnet test (with no explicit path) resolved that solution and blew up with MSB3202: project file ... was not found.

Rather than just removing the dead refs, this modernizes the setup:

What

  • Replace GraphicalTools.sln with GraphicalTools.slnx — 5-line declarative XML, no GUIDs, no platform/config matrix. Trivially reviewable; stale references like the Terminal.Gui ones become obvious in diff.
  • Track .slnx and .vscode/ — removed the broad ignores. The whole point of .slnx is that it's small enough to live in source control.
  • Delete tools/initDevEnvironment.ps1 + tools/ide/ — no longer needed. The script existed to regenerate a per-developer .sln (because .slns were ignored). With .slnx tracked, devs just clone and go. VS Code workspace files now come from .vscode/ directly, which is the supported way to share dev config.
  • Add .vscode/{launch,tasks,extensions}.json:
    • launch.json: one coreclr debug profile with a pickString input that prompts for which OCGV / Show-ObjectTree sample to run after importing the freshly built module. Adding new scenarios = appending one line.
    • tasks.json: build (Invoke-Build Build), test (zero-arg dotnet test — auto-resolves .slnx), clean.
    • extensions.json: recommends C# Dev Kit + C# + PowerShell.
  • ConsoleGuiTools.build.ps1 Test task: kept as plain dotnet test — works correctly now that the bad .sln is gone (auto-resolves .slnx).

Verified locally

  • dotnet build GraphicalTools.slnx — clean
  • dotnet test (zero-arg) — 73/73 passing
  • Invoke-Build Build, Test — green

This should unblock CI on PowerShell#267.

The tracked GraphicalTools.sln carried stale ProjectReferences to
local Terminal.Gui sources, breaking CI's `dotnet test` (which was
implicitly resolving the solution). Switch to the modern .slnx format
and track it directly so the solution is reviewable and small.

- Replace GraphicalTools.sln with GraphicalTools.slnx (5-line XML;
  lists the 3 real projects, no dead Terminal.Gui ProjectReferences)
- Stop ignoring .slnx and .vscode/; track them
- Remove tools/initDevEnvironment.ps1 and tools/ide/ — no longer
  needed; .slnx is small enough to track and VS Code workspace
  files are now the supported way to share dev config
- Add .vscode/{launch,tasks,extensions}.json:
  * launch.json: single coreclr profile with a pickString input for
    selecting one of the OCGV / Show-ObjectTree sample commands
  * tasks.json: build (Invoke-Build), test (zero-arg dotnet test
    auto-resolves the .slnx), clean
  * extensions.json: recommends C# Dev Kit + PowerShell

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@andyleejordan
Copy link
Copy Markdown
Author

Hey @tig I fixed the CI and cleaned up the dev stuff, you can merge that to your branch to update the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant