SharpSVN Example Program Crashes

℡╲_俬逩灬. 提交于 2019-12-08 16:19:54

问题


I downloaded the SharpSVN example they give to try and test it out but I get this error when I try and run it.

System.BadImageFormatException {"Could not load file or assembly 'SharpSvn, Version=1.4999.376.29668, Culture=neutral, PublicKeyToken=d729672594885a28' or one of its dependencies. An attempt was made to load a program with an incorrect format."}

After I downloaded I went to load the project, did the requested conversion with no errors then just tried to run it. Haven't been able to find a solution online.

Running on 64-bit W7 and I notice all the .dlls and other files are all _32, not sure if that is the problem.


回答1:


Is the application compiled for x86? If it is compiled for Any CPU, it will be jitted to x64 on a 64-bit system, which leads to this error if it is loading 32-bit DLLs. You have to add an x86 configuration, and build that configuration.




回答2:


It was maybe that you were using the SharpSvn's dll in a .NET 4.0 project. If so, try this in your app.config file:

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
  </startup>
</configuration>



回答3:


my dev environment is 32 bits and our CI build and server is 64 bits . What I ended up.There are two nuget packeges for sharpsvn x86 and x64 ! I installed both of them then I change refrences of srapsvn and sharpsvnUI manually!



来源:https://stackoverflow.com/questions/2999031/sharpsvn-example-program-crashes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!