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

Template namespaces missing subfolder #235

Open
moon6969 opened this issue Sep 14, 2023 · 1 comment
Open

Template namespaces missing subfolder #235

moon6969 opened this issue Sep 14, 2023 · 1 comment

Comments

@moon6969
Copy link

When adding a new Avalonia Window or UserControl in a subfolder, the new item does not include the subfolder in the namespace. EG: for /Views/UserControl1.axaml.cs :

using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;

namespace AvaloniaTemplateNamespaceIssue;

public partial class UserControl1 : UserControl

This is different & confusing behaviour since the initial items created by the new project template do include the subfolder. EG: for /Views/MainWindow.axaml.cs :

using Avalonia.Controls;

namespace AvaloniaTemplateNamespaceIssue.Views;

public partial class MainWindow : Window

Avalonia v11.0.4
Avalonia for Visual Studio 2022 v11.1
Avalonia.Templates v11.0.2

@Mrxx99
Copy link
Contributor

Mrxx99 commented Sep 14, 2023

This is a limitation of the dotnet templating engine currently, see dotnet/templating#6010.
Feel free to upvote and add your voice to that issue.

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

No branches or pull requests

3 participants