Share via


The file or assembly "... Version=1.0.0.0, Culture = neutral, PublicKeyToken = null " or a dependency on it was not found. Attempts have been made to load a file with a wrong format.

Question

Tuesday, April 23, 2019 11:59 AM

Hello,

I have two projects in the same projectmap: 

- the 1st project is an ASP.NET webforms application

- the 2nd project is a .NET console application.

The 2nd project inserted as a reference in a 1st project, so  that the 1st project can use all public classes and functions of a 2nd project. (the 2nd project is an .exe and not dll).

The reference to .exe and not to .dll worked fine in VS2010.

The exe-Assembly will be saved local in a 1st project, (without GAC registry).

In VS 2017 I became an error:

"The file or assembly  "2nd.exe Version=1.0.0.0, Culture = neutral, PublicKeyToken = null " or a dependency on it was not found. Attempts have been made to load a file with a wrong format.  (the 2nd.exe saved in a bin-folder of a 1st project)."

It seems to be, the exe-Assembly should be registred in GAC. But I would like to save it  local.

How can I solve this problem?

Thanks

All replies (2)

Tuesday, April 23, 2019 1:21 PM

That helped:

https://social.msdn.microsoft.com/Forums/en-US/f4d4046e-4786-413f-966d-a0d6ad6d0212/cannot-figure-out-how-to-change-the-quotany-cpuquot-to-quotx86quot?forum=netfx64bit


Wednesday, April 24, 2019 3:39 AM

Hi Interraptor, 

Did the link solves this issues?

If so, please mark the reply as answer of this thread, It will be beneficial and convenience for other community members which have the similar issue.

Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]