Skip to content

Support for .NET 6 implicit usings #124

Open
@JonHodgins

Description

@JonHodgins

Description

Using Add New File for C# classes and interfaces will add usings from the System namespaces even when implicit usings is enabled. I believe these can be overridden by adding custom templates, but this extension should ideally be able to detect if implicit usings are enabled and then omit them.

Steps to reproduce

  1. Create a new project from a .NET6 template, or enable implicit usings in an existing .csproj
  2. Use Add New File to add a C# class or interface

Expected behavior:

The new class/interface contains no using statements.

Actual behavior:

The new class/interface contains using statements for System, System.Collections.Generic, System.Linq, System.Text, and System.Threading.Tasks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions