C# target platform is x64, custom control is not available, display control failed to load, error solution

 Since the third-party dll loaded by the project needs to be compiled into x64, set the compilation target to x64

As a result, when the window designer is opened, the custom controls cannot be displayed and loaded

Error Message: Could not find type 'XXX'. Make sure the assembly containing this type is referenced. If this type is part of a development project, make sure the project was successfully built with settings for the current platform or any CPU. 

Cause Analysis:

Visual Studio is an x86 program, and the form designer can only be used normally if it is generated for the current platform (x86).

 Solution

1: The platform target is set to AnyCPU platform to modify the form, and then replace it to X64 for use after modification

2: Seal the custom control into a control library, and then call it on the X64 platform.

Guess you like

Origin blog.csdn.net/qq_30725967/article/details/131930790