Some imported namespaces have a disabled (greyed) check mark

Andrew Mercer 486 Reputation points
2025-02-14T13:13:55.9033333+00:00

Using VS Community 2022, I have a VB Windows Forms Project. In Project, Properties, References, I see about a dozen namespaces with a check mark indicating they are imported into my project. So far so good.

Three of them (System.Drawing, System.Windows.Forms, and System.Math) are checked with an enabled check mark meaning I can uncheck them. The rest have a disabled check mark (greyed out) meaning I can't uncheck them.

This appears to be a difference between VS 2019 (check marks always enabled) and VS 2022 (some enabled, some not). I would like to trim my namespace imports to a minimum, and I don't mind fully qualifying rarely used names. So how do I remove an import that VS has added but won't let me remove?

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,443 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,780 questions
0 comments No comments
{count} votes

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.