When I create a new project, the using System namespace and others that are usually added automatically are no longer added.

dragonFly 21 Reputation points
2022-08-09T06:01:37.997+00:00

After upgrading Visual Studio to the latest version, I noticed that when I create a new project, the using System namespace and others that are usually added automatically are no longer added. Am I creating new projects wrong? Do we have to add even the basics manually now for some reason?

Microsoft Visual Studio Community 2022 (64-bit) -
Current Version 17.2.6

Here is how I am creating a new project:
New Project > Console App > .NET 6.0 (Long-Term Support) and I've tried with the box "Do not use top-level statements" unchecked and checked
I've also tried New Project > ASP.NET Core Web App with the same results.

Developer technologies Visual Studio Other
{count} votes

Accepted answer
  1. Viorel 122.5K Reputation points
    2022-08-09T08:29:22.987+00:00

    If you double-click the project node in Solution Explorer, you will see the project's details in XML format. There is a <ImplicitUsings>enable</ImplicitUsings> element, which is related to a new feature — "Implicit Usings":

    You can change it to disable to see the effect.

    3 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.