TypeLoadException occurred while dragging user control in VS Designer

I created a custom ListView class, BinableListView, which inherits from ListView. I was able to drag a custom ListView into a form in the designer window. Now I am trying to first add a custom ListView to another user control and add this user control to the form. However, VS throws a TypeLoadException when I drag the user control onto the form in the constructor. Can anyone guess what could happen?

I am using Visual Studio 2008 to target .NET runtime 3.5.

+3
source share
1 answer

Is a user control in a separate library? If so, make sure that the library can be compiled successfully and that in your link you set CopyLocal to true.

Also check for additional libraries that are used by your user control that may not be available as links in your application project.

Sometimes it helps just clean and rebuild everything and try again.

0
source

Source: https://habr.com/ru/post/1751645/


All Articles