I have a generic base form, and the descendant forms don't work in the designer. This is apparently a well-known problem, and the same answer is given here and here, to name just two places.
This solution seems to work for everyone else, and when I implement it, at least I get a different error:
"Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "MyBaseForm`1.resources" was correctly embedded or linked into assembly "MyAssembly" at compile time, or that all the satellite assemblies required are loadable and fully signed."
My classes are:
public partial class MyBaseForm<T> : Form { }
#if DEBUG
public partial class MyIntForm_Design : MyBaseForm<int> {
}
#endif
public partial class MyIntForm
#if DEBUG
: MyIntForm_Design {
#else
: MyBaseForm<int> {
#endif
}
Now what hoop do I have to jump through here?
EDIT: OMG, I found the problem - well, sort of. The base form has its Icon
property set, which created something in the resource file. When I removed the icon and recompiled, the base form suddenly works!
Now answer credit for this question goes to whoever finds a workaround so that I can keep the icon in my base form!