I am working on a very large project that has 70+ assemblies and dozens of different user controls. Every time I open up the Forms designer to work on a Form, it takes a ridiculously long time to do so. I just assumed this was my machine being underweight for the project.
So fast forward to today. I happen to have reset my workspace so my toolbox wasn’t set to auto-hide. As I opened up my Form to work on it, I notice the Toolbox start flickering and loading all the controls in the project. Hmmm….Looks like we found why the Form load is so slow. Why on earth it takes up to minutes to read all the controls in the application is mind boggling, but now I know it does it sets me on the path to fix it.
After researching the settings in Visual Studio, I find this little hidden gem.
Tools->Options->Windows Forms Designer->General->AutoToolboxPopulate
Set this bad boy to False and you get rid of the annoying lag. You will not get the controls to appear automatically in your toolbox now though, so be aware of that. You will need to add them manually. Oh, the horror. The horror……. Ha.
Enjoy the savings of time and hair pulling.