Empty toolbox in Visual Studio 2022 for .NET 6.0 WinForms and Control Library projects
Asked Answered
E

6

41

When I create WinForms project or Control Library project for .NET 6.0, the designer toolbox is empty with information "There are no usable controls in this group".

Reseting toolbox does not fix the problem. Repairing VS installation from VS Installer level does not fix the problem.

Visual Studio Cummunity 2022 v 17.3.1

Has anyone encountered such a problem?

Easement answered 18/8, 2022 at 11:38 Comment(9)
Can you be more specific? What template did you use (complete name)? The one that creates a default GUI, a UserControl or a Class Library? If the latter, then no, there are no Toolbox items, since there's no designer. If the former, you need to have a Form or UserControl in Design mode for the Toolbox to show any items.Alicia
I used "Windows Forms App" template. When I use Windows F"orms App (.NET Framework)" everything is ok, but I can only set .net 4.8.Elora
Design mode is on, form appears, but toolbox is empty.Elora
Try to download the latest (v. 6.0.4) full .Net 6.0.8 SDK x64. Restart the machine. Create a new Project using the Windows Forms App Template.Alicia
Problem still exists.Elora
With the information available, that's more or less what I can suggest to try out -- You obviously have checked that Options -> Windows Forms Designer -> Automatically populate Toolbox is set to true and you have reset the Toolbox (again). After that, you should probably try to re-install VS (not repair it), making sure all the relevant components of the .Net desktop development workload are selected -- I cannot reproduce the problem.Alicia
Populate toolbox was set to true. I made toolbox reset and now its ok. I probably should have done a reset of toolbox after installing SDK.Elora
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.Yemen
It happened to me just now. This problem has been in existence for over 8 years and multiple versions. Someone should do something about it. See "Related" on the right hand side of this question to see how many other people have asked about it.Caughey
L
88

I found a solution for this:

  1. Close Visual Studio

  2. Go to this folder on your computer:

    %USERPROFILE%\Local Settings\Application Data\Microsoft\VisualStudio\

  3. Open the sub-folder for your version of Visual Studio, something like 17.0_65d436a7

  4. Delete these 4 files:

    • toolbox.tbd
    • toolbox_reset.tbd
    • toolboxIndex.tbd
    • toolboxIndex_reset.tbd
  5. After you open Visual Studio the toolbox items should be there.

Latinism answered 21/12, 2022 at 19:51 Comment(8)
Thanks! This was the only solution that worked. The described path in step 2 however is not correct (for me), I used this instead "%LOCALAPPDATA%\Microsoft\VisualStudio\"Actinochemistry
Thanks! I had all toolbox items appearing correctly for WinForms .NET framework projects, but none (greyed out) for WinForms .NET (Core/5+) projects. All other solutions suggesting Reset toolbox or Repair did not work. Your solution worked.Vitrics
Wish the OP had marked this as the answer. Worked for me as well. Reset Toolbox did not work.Neville
This really works. There's also a couple of "cache" files in there, that you can delete.Lavine
This works on .net 8 tooOverage
For my VS 2022 there was only one file ToolboxItemDiscoveryCache.7036b125-fa82-3aba-acb8-bdbc97782a06 in the "%LOCALAPPDATA%\Microsoft\VisualStudio\", removing it and restarting VS helped.Ferritin
Mine are all still greyed out.Olney
You save my life, i works for me on .net8.Obnoxious
W
10

Following sequence fixed it without file manipulation.

  1. Menu View-Toolbox. (nothing shows in toolbox)
  2. Right click on toolbox, "Click Reset toolbox". Even though you might not see anything, wait. Then right click again and click on "show all"
  3. Close all instances of VS and open it again
  4. Go to Menu View-Toolbox. Click "show all" if controls not showing. you now should see controls but these could be in a disarray.
  5. Right click on toolbox, "Click Reset toolbox". Now your controls should be visible and in proper order.

The bottom line here: Reset, Show all, Restart - these actions lead to eventual fix.

Whetstone answered 13/3 at 14:24 Comment(1)
Steps 1-3 worked for me.Pearlstein
A
6

A similar issue occurred on my machine, with an empty Toolbox and all the latest updates. I hadn't noticed the Reset Toolbox option, but I landed here after searching and the comments above helped resolve my issue. For future reference, here's a quick visual guide of things to try if the Toolbox is empty.

Verify

Verify auto-populate toolbox

Reset

Reset Toolbox

Resetting...

enter image description here

Anility answered 3/9, 2022 at 19:55 Comment(1)
I am using VS 2022 (ver 17.7.4) for Windows Form application in .Net 7. Almost everyday, toolbox gets empty. I have to reset it, close, and then reopen VS. Any permanent solution?Isobaric
D
3

Try right click on Toolbox empty space and click "Show All".

Destination answered 16/9, 2022 at 18:51 Comment(1)
It works for showing them, but they're shown greyed out and you can't use them.Besmirch
A
1

Had the same issue. Clicked 'show all' and reset toolbox. Still no result. But after closing Visual studio and restarted, the toolbox worked properly.

Annunciata answered 26/6 at 12:48 Comment(0)
A
0

Try to open VS Installer => More => Repair => reboot your machine => restart VS.

Abortion answered 13/9, 2023 at 17:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.