The C# designers in VS2008 have some issues, e.g. they sometimes ‘forget’ a control when the project is compiled. The designer especially tends to forget usercontrols.
I googled a while back to work around this – found this hint: Close all designers before compiling the project.
Does this really help?
And is there a way to to it automatically? (Pre-Compile-Script etc?)
Here is the macro which closes all designers and leaves text files opened:
See my quick tutorial how to create and execute VS macro and assign a keybord shortcut or button to it. You can even automatically execute this macro before each build. In the Macros IDE Class View navigate to MyMacros – EnvironmentEvents. Open (double-click) EnvironmentEvents. Insert the following code inside module: