Maanu
Maanu

Reputation: 5203

Cannot load a User Control to Tool Box

When we add a user control dll to the Tool Box of Visual Studio, We are getting the following error message. The issue occurs in WinXP 64 bit. The user control refers a module named ICEConnect200Bridge. The assembly ICEConnect200Bridge is a C++ CLI module. The user control was built using 'Any CPU' platform.

What build option should I give for ICEConnect200Bridge? What should I do to identify the exact cause of the issue?

Could not load file or assembly 'ICEConnect200Bridge, Version=1.2.6.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format

Upvotes: 0

Views: 516

Answers (1)

kroonwijk
kroonwijk

Reputation: 8400

When building ICEConnect200Bridge, put the target specifically to x86 instead of Any CPU. Visual Studio is compiled for x86 and installed in Program Files (x86) and does not accept controls in its toolbox that are not explicitly compiled for the same target.

Upvotes: 3

Related Questions