Skip to content
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

UserControl template misses directory name in the namespaces #492

Open
user98392 opened this issue Aug 12, 2024 · 3 comments
Open

UserControl template misses directory name in the namespaces #492

user98392 opened this issue Aug 12, 2024 · 3 comments
Labels

Comments

@user98392
Copy link

Describe the bug

User control when created in a directory doesn't have the directory name in the namespaces, only the project name, both in axaml and code-behind.

Actually, you made a mistake by removing the wrong set of templates in 11.6, it was the right one with proper namespaces so I guess the solution would be to replace the current templates with them and update the icons.

To Reproduce

Create a project and a directory then create a user control there to see that the directory name isn't included in the namespaces.

AvaloniaVS plugin version

11.6

Avalonia version

Irrelevant

Visual Studio version

Irrelevant

Relevant log output

No logs.

Additional context

No response

@user98392 user98392 added the bug label Aug 12, 2024
@stevemonaco
Copy link

Avalonia was maintaining two sets of project templates (AvaloniaVS and avalonia-dotnet-templates) for awhile which resulted in extra work. Now the VS extension seems to only use avalonia-dotnet-templates (which can also work via dotnet new).

This issue is an upstream limitation in dotnet templates. See AvaloniaUI/avalonia-dotnet-templates#235

@user98392
Copy link
Author

@stevemonaco but the other set was fine why not use them instead in dotnet new?

@stevemonaco
Copy link

The VS templates only work in VS whereas Rider and CLI also use the dotnet new templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants