文件或程序集“... Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null”或找不到它的依赖。已尝试加载格式错误的文件。 [英] 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.

查看:766
本文介绍了文件或程序集“... Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null”或找不到它的依赖。已尝试加载格式错误的文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我在同一个项目地图中有两个项目: 


- 第一个项目是ASP.NET webforms应用程序


- 第二个项目是.NET控制台应用程序。


在第一个项目中作为参考插入的第二个项目,s O 第一个项目可以使用第二个项目的所有公共类和函数。 (第二个项目是.exe而不是dll。)


对.exe的引用而不是.dll在VS2010中的工作正常。


exe-Assembly将保存在第一个项目的本地,(没有GAC注册表)。


在VS 2017中,我成了一个错误:


"文件或程序集  "2nd.exe Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null"或找不到它的依赖。已尝试加载格式错误的文件。  (2nd.exe保存在第一个项目的bin-folder
中)。"


似乎是,exe-大会应在GAC注册。但我想保存它 本地。


如何解决这个问题?


谢谢








解决方案

这有助于:



https://social.msdn.microsoft.com/Forums/en-US/f4d4046e-4786-413f-966d-a0d6ad6d0212/不能位数出-如何到变化最quotany-cpuquot到quotx86quot?论坛= netfx64bit


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


解决方案

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


这篇关于文件或程序集“... Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null”或找不到它的依赖。已尝试加载格式错误的文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆