问题
Working on windows forms in Visual Studio 2008 with C#
So I had a windows Form Control that wasn't behaving the way I wanted. So I overloaded the Size property.
Bad idea. Everything broke. Horribly. I could not add this control to a form anymore. This was slightly problematic.
So I removed the offending code, and recompiled. Problem solved... right?
Not so much. I can't add this form to my code STILL. And it was working before. I scour the code for any changes I could have made, recompile again, and nothing changes.
So I conclude, that my code is correct, my DLL is pristine, and it's just not reloading the toolbox.
Close visual studio, open it back up, and everything works just fine. (well, works like it did before I broke everything)
Is there a way to do this WITHOUT closing out 2008? Because it's really quite annoying.
回答1:
Try closing the solution & opening it again.
Or closing the toolbox tab & again enabling it via View-> Toolbox
回答2:
Try Cleaning and recompiling the whole solution. Another trick is to delete all binary output (this includes the obj-folder) of each project.
来源:https://stackoverflow.com/questions/1212397/how-do-i-refresh-the-toolbox-in-visual-studio-2008