VS 2013 Designer - "An attempt was made to load a program with the wrong format"

Among other elements, my solution contains a project that defines a control and another project that uses this control in the form. When I try to open this form in VS Designer, I get the following error:

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

where libX is neither a control project, nor a form project. When I try to just build a solution, everything goes fine. When I run the application that shows the form, everything is fine. The designer does not seem to like something.

Things I've tried so far:

  • Having thought about this problem, I made general attempts to solve this problem. Namely, the configuration of my solution is correct in Configuration Manager, and the project does not use anything from IIS (therefore, the solution with inclusion of 32b is not applied).
  • I tried to open the form while working on another version of VS 2013 (12.0.21005.1 REL), and it worked without problems.
  • I am using VS 2013 Update 5. Since there were times when Designed worked fine, I tried downgrading to Update 2 - without help.
  • I tried Repair my VS - without help.

EDIT: A minimal project demonstrating the problem can be found here . The problematic form can be found in the project +lib.trading\lib.trading.obj.forms.strategyParametersForm .

The error that I get when opening the form in VS Designer is the following: enter image description here

Any help really appreciated Daniel

+5
source share
1 answer

An attempt was made to download a program with the wrong format. If the application is running in Visual Studio installed on a 64-bit OS, with TargetCPU = "Any CPU" the error message "An attempt was made to load a program with the wrong format (exception from HRESULT: 0x8007000B)" may occur.

0
source

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


All Articles