Search code examples
c#winformsvisual-studio-2015user-controls.net-assembly

Form does not open in VS2015, because own UserControl is not found


Since i moved everything in my project to x64 and moved some files in subfolders everything works fine but an important form which is using an own userControl.

When i open the Form in VS2015 i get

Could not find type 'WYSIWYGEditor.Editor'. 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.

Before, this usercontrol was in the same project. After i got this error i tried many things to fix this error. After having no solution i moved it to an own project which is also compiling in x64 and is referenced from the main project. Compiling shows, that both are compiled in x64 and debugging and running the project works well.

Last but not least i tried everything from here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/38524a8c-8c4c-48e7-b62d-0d02fe0f5624/user-control-quotcould-not-find-typequot-error-in-form-designer?forum=vbgeneral

  • Cleaning up project
  • Recompiling
  • Renaming the UserControl several Times
  • Removing it from the form (form opens) and putting it back to the place
  • ...

Nothing helped. Anyone had similar issues and was able to fix it?

Greetings from Germany

Image: Form does not open


Solution

  • I do not know what the point is and hope anyone can explain it.

    In a german topic i found the tip to compile the userControl in x86. So i changed my Configuration for debug to compile the Usercontrol-Project in x86. After doing a rebuild for the dll-Project it worked!

    Configuration