VS2010中的SharpSVN错误 [英] SharpSVN error in VS2010

查看:251
本文介绍了VS2010中的SharpSVN错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让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位的,并且我已经将Configuration Manager设置为构建为x64,并将64位版本的SharpSVN.dll复制到了项目的bin目录中.此外,我还尝试将build设置为x86并使用SharpSVN.dll的x86版本,并且出现相同的错误(因此我怀疑该错误可能与指令集家族没有直接关系).

在我的配置文件中,我尝试将以下内容添加到Assemblys属性:

<add assembly="SharpSvn, Version=1.6016.1637.10768, Culture=neutral, PublicKeyToken=d729672594885a28"/>

有什么想法吗?

解决方案

尽管认为<add assembly>就足够了,但实际上我通过向GAC中添加SharpSvn解决了这个问题(如果有人也遇到了这个问题)./p>

I'm trying to get SharpSVN to work with a VB.NET project I'm working on in VS2010. I've added SharpSVN.dll to my project references but the following error appears when I try to load the site:

Could not load file or assembly 'SharpSvn' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly 'SharpSvn' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

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.

My machine is 64-bit, and I've set the Configuration Manager to build to x64 as well as copied the 64-bit version of SharpSVN.dll into my project's bin directory. Additionally, I've also tried setting build to x86 and using the x86 version of SharpSVN.dll and the same error appears (so I suspect the error may not be directly related to instruction set family).

In my config file, I've tried adding the following to the assemblies attribute:

<add assembly="SharpSvn, Version=1.6016.1637.10768, Culture=neutral, PublicKeyToken=d729672594885a28"/>

Any ideas?

解决方案

Despite thinking that <add assembly> was enough, I actually solved this issue by adding SharpSvn to GAC (in case anybody is running into this problem as well).

这篇关于VS2010中的SharpSVN错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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