You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally when creating a new file in Visual Studio, if the project name has an invalid character such as a dash ("-"), when a new file is generated, the namespace will use a substituted valid character, such as an underscore ("_"). The Avalonia item types (Class, Window, etc.) do not do this, resulting in un-compliable code.
To Reproduce
Steps to reproduce the behavior:
Create a new Avalonia project in Visual Studio and choose a project name that includes the character "-".
Build the project. It will build properly.
In solution explorer, right-click on a folder and choose "Add" -> "New Item". Add a class, Avalonia Window, Avalonia UserControl, or other Avalonia item.
Check the namespace that is auto-defined in the associated .cs file. It will contain the "-", which is not an allowed character in the namespace. The code will not compile.
Expected behavior
The "-" should be removed or substituted with a valid character. Microsoft uses "_".
Screenshots
Environment
OS: Windows
Avalonia-Version: 11.0.6
IDE: Visual Studio 2022 Community Edition
The text was updated successfully, but these errors were encountered:
Describe the bug
Normally when creating a new file in Visual Studio, if the project name has an invalid character such as a dash ("-"), when a new file is generated, the namespace will use a substituted valid character, such as an underscore ("_"). The Avalonia item types (Class, Window, etc.) do not do this, resulting in un-compliable code.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The "-" should be removed or substituted with a valid character. Microsoft uses "_".
Screenshots
Environment
The text was updated successfully, but these errors were encountered: