Skip to content

Missing space between "internal" access modifier and "class" keyword when creating a new C# class when using File Scoped Namespaces as a VS default. #60345

@nicktheone

Description

@nicktheone

Version Used:
Microsoft Visual Studio Community 2022 (64 bit) - Current
Versione 17.1.1

Steps to Reproduce:

  1. Create a new .NET 6 Console app.
  2. Change the default namespace handling in VS (not with an .editorconfig file) from Block to File Scoped.
  3. Create a new class from right-click on project>add>class...

Expected Behavior:
VS should generate a correctly worded file like so:

internal class Class1
{
}

Actual Behavior:
VS generates a file with a missing space/typo like so:

internalclass Class1
{
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEuntriagedIssues and PRs which have not yet been triaged by a lead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions