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

£可爱£侵袭症+ 提交于 2019-12-10 12:51:16

问题


I just downloaded the 64bit version of the SharpSVN here's the link!

When I run my application, error message displayed. I have searched the net on how to fix this issue but I'm failed. I tried the following solution:

  1. setting the Configuration Manager to x64 as suggested on this post
  2. setting the startup config on this response
  3. also tried downloading x86 and set the config manager to x86.
  4. tried this also, adding assembly link

I'm using Win7, 64bit,.net 4.0.


回答1:


Solve it.

  1. Change my platform to x86
  2. Output path to "bin\"
  3. Downloaded the x86 of SharpSVN (1.7008.2243.14245)
  4. Add SharpSVN.dll in GAC.
  5. Delete the bin folder and rebuild solution

This is the link for the explanation.




回答2:


If you're getting this error when trying to access a website hosted in IIS, you may need to adjust the "Enable 32-Bit Applications" setting in your application pool. See this answer: https://stackoverflow.com/a/20525314/12484




回答3:


This may also come down to a mismatched version of the Microsoft Visual C++ Redistributable Package depending on the version of SharpSvn and the version of Windows/Visual Studio.

Newer versions of SharpSvn have a dependency on the "Microsoft Visual C++ 2010 SP1 Redistributable Package".

x64 - https://www.microsoft.com/en-us/download/details.aspx?id=13523

x86 - https://www.microsoft.com/en-us/download/details.aspx?id=8328



来源:https://stackoverflow.com/questions/15352528/could-not-load-file-or-assembly-sharpsvn-or-one-of-its-dependencies-an-attemp

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