gui-cs / Terminal.Gui

Cross Platform Terminal UI toolkit for .NET
MIT License
9.7k stars 690 forks source link

Terminal Gui Templates still using v1 #3746

Open JudgeGroovyman opened 1 month ago

JudgeGroovyman commented 1 month ago

Describe the bug A user should be able to naturally follow the steps on the main page with no errors which suggest to run the template commands, and then run the example code.

To Reproduce

  1. Go to the main github page (default v2 development branch)
  2. Paste those 4 commands in the Quick Start which runs fine (these are v1) but
  3. Paste the code from the Sample Usage in C# section into the Program.cs and it doesn't run (this code is v2)

Expected behavior A user should be able to naturally follow the steps on the main page with no errors which suggest to run the template commands, and then run the example code.

Either

  1. the templates should be updated for v2 or
  2. new templates should be added for v2 and those should be what is in the README.md or
  3. the example in the README.md should be switched back to the v1 version from the v1 branch. If you do that then new users will have to realize that it isn't v2 and intentionally choose to use v2 which is probably best for all new users (in fact v1 is what is recommended above in the README.md itself)
tznind commented 1 month ago

I have updated the templates project and released to nuget.

I've named the release version the same as the library package release that it targets. This is consistent with Terminal.Gui Designer.

It ensures that while we are still in alpha and making breaking changes the restored nuget package will always work (it is pinned).

Unfortunately the install command for templates (dotnet new install) does not support --prerelease so you need to explicitly name the version you want to install.

The README on the template repo has been updated accordingly so it explains how to target v1 or v2.

dotnet new install Terminal.Gui.Templates::2.0.0-v2-develop.2203

Let me know if you have any issues @JudgeGroovyman and we can re-open.

tznind commented 1 month ago

@tig I am reopening as I realize the 'Quick Start' section still shows the template v1. But installing pre release templates is annoying because you have to specify full version (See above).

Not sure what you want to do about that. Could copy the code from the template readme or just put in the version explicitly like above?