【发布时间】:2011-10-24 23:43:06
【问题描述】:
我正在尝试让 SharpSVN 与我在 VS2010 中工作的 VB.NET 项目一起工作。我已将 SharpSVN.dll 添加到我的项目引用中,但是当我尝试加载站点时出现以下错误:
Could not load file or assembly 'SharpSvn' or one of its dependencies. An attempt was made to load a program with an incorrect format.
说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息: System.BadImageFormatException:无法加载文件或程序集“SharpSvn”或其依赖项之一。试图加载格式不正确的程序。
来源错误:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
我的机器是 64 位的,我已将配置管理器设置为 x64,并将 SharpSVN.dll 的 64 位版本复制到我项目的 bin 目录中。此外,我还尝试将 build 设置为 x86 并使用 x86 版本的 SharpSVN.dll 并出现相同的错误(因此我怀疑该错误可能与指令集系列没有直接关系)。
在我的配置文件中,我尝试将以下内容添加到程序集属性中:
<add assembly="SharpSvn, Version=1.6016.1637.10768, Culture=neutral, PublicKeyToken=d729672594885a28"/>
有什么想法吗?
【问题讨论】:
-
我也有类似的问题。我收到了这个错误,但我的项目甚至不再使用 SharpSVN(它曾经有一段时间,但我们删除了它)。几个月来一直工作正常,一夜之间突然失败,没有做任何改变。非常令人沮丧,因为在项目或系统中的任何地方似乎都没有对 SharpSVN 的任何引用。