0
votes

I have one single project in the solution, where all forms, classes and user controls are located.

On opening a few different forms in the Designer, I get the following error:

Could not find type 'MyApp.MyCustomControl'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

And the error has this MSDN article.

All items (classes, user controls, etc) are marked as internal and there's no mixture of multiple namespaces. Also, these classes are all accessible in code. The solution compiles and builds successfully. Only some forms won't open in the Designer.

I've cleaned, rebuilt and restarted the solution multiple times but the error persists.

What am I missing?

1
Try deleting the bin and obj folders; rebuilding; and trying again. If that fails, sacrifice a guinea pigMicky

1 Answers

0
votes

If you have no luck with MickyD's solution, you can try to remove the references that contain your custom controls and add them back.

Also, try to add your custom control into your designer's toolbox and see if Visual Studio complains about it.

Ultimately, open your designer.cs/vb file and try to edit the fullname of the controls that visual fails to find, that may give you a hint.