AddAnyFile icon indicating copy to clipboard operation
AddAnyFile copied to clipboard

Support for .NET 6 implicit usings

Open JonHodgins opened this issue 3 years ago • 0 comments

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.

JonHodgins avatar Jun 03 '22 23:06 JonHodgins