I have two C# .NET projects in my solution. One project is a DLL that contains a WinForms custom UserControl
. The other project is a WinForms EXE that references and uses that UserControl
on a Form
.
I have added a handful of properties to the UserControl
so that when I place the control on a form I can easily set these properties in the designer just like any other control.
All is well and good until I add a new property to the UserControl
. The new property doesn't appear in the forms designer. I've tried doing a deep rebuild and reopening the solution.
I can manually go into the .designer.cs file and set the new property's value. The project will actually compile and run but the forms designer claims the property doesn't exist and will not open the form.
The only thing I've found that works is to close and restart visual studio. Is there any other way to see the new properties without restarting Visual Studio?
Edit I tried reproducing this in a clean solution and everything seemed to work. Then I remembered that in the the original solution the DLL is signed and installed to the GAC with a post-build step. I think the Visual Studio forms designer is loading the assembly from the GAC to reflect on it to get the list of properties. This is fine until I add new properties. I can build the assembly and install it again to the GAC but Visual Studio does not see the new properties.