Skip to content

Designer doesn't recognize file-level namespaces #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
svew opened this issue Mar 14, 2025 · 4 comments
Closed

Designer doesn't recognize file-level namespaces #308

svew opened this issue Mar 14, 2025 · 4 comments

Comments

@svew
Copy link

svew commented Mar 14, 2025

I generated a new Designer class with TerminalGuiDesigner, and modified the base .cs file to look something like this:

using Terminal.Gui;

namespace OsWorkspaces;

public partial class NewWindow
{
    public NewWindow()
    {
        InitializeComponent();
    }
}

When I tried opening this file again in the designer, I see this error:

Image

When I use a namespace block instead, this works just fine.

tznind added a commit that referenced this issue Mar 14, 2025
@tznind tznind mentioned this issue Mar 14, 2025
@tznind
Copy link
Collaborator

tznind commented Mar 14, 2025

This was already fixed in v2 branch via cbf093f (v2 is alpha)

I have created a similar PR for v1 see #309

@tznind
Copy link
Collaborator

tznind commented Mar 14, 2025

@svew I have pushed version v1.1.1 to nuget, please update the tool and let me know if you have any issues.

I had to drop 7.0 support but that is short term support anyway. I dropped because it was no longer in the CI image and its easier to drop than to change CI.

I am not making big changes to v1 anymore and instead focusing on v2 which targets the Terminal.Gui version 2 which is a complete overhaul of entire library (but still pre alpha).

@svew
Copy link
Author

svew commented Mar 18, 2025

I am not making big changes to v1 anymore and instead focusing on v2 which targets the Terminal.Gui version 2 which is a complete overhaul of entire library (but still pre alpha).

Makes sense! I'm starting a new project and was a bit hesitant to use the v2 framework since I saw it was still in alpha after a few years. How's the work on this coming along? Is it stable enough to use for greenfield development?

@svew svew closed this as completed Mar 18, 2025
@tznind
Copy link
Collaborator

tznind commented Mar 19, 2025

Is it stable enough to use for greenfield development?

V2 of Terminal.Gui is coming along very well. In terms of stability, there are 2 aspects:

  • Running stability, does the code work, and has few/no bugs
  • API stability, does v2 releases have breaking changes between versions (renamed methods, different args, etc)

I update designer periodically to the latest v2 and do robust testing of the first (do all the features work properly) - so if you take only the nuget packages that are supported by designer it should not be a problem.

For the breaking changes, these do happen but typically don't require too much code change to keep up with.

In the plus column, V2 has:

  • much more flexible table view
  • Sixel image support
  • Engine logging and performance metrics
  • Gradients

And many other cool features, so it is up to you

The current v2 designer update PR is #307

This should be released in next few days

The last v2 nuget package supported by designer is 2.0.0-v2-develop.2203

The above PR highlights the nature of the breaking changes - renamed methods etc.

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

No branches or pull requests

2 participants