文件或程序集“... 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.
问题描述
您好,
我在同一个项目地图中有两个项目:
- 第一个项目是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注册。但我想保存它 本地。
如何解决这个问题?
谢谢
这有助于:
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:
这篇关于文件或程序集“... Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null”或找不到它的依赖。已尝试加载格式错误的文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!