我正在使用 subversion Sharpsvn 连接库,但总是出错。 代码如下:
SvnClient client = new SvnClient();
string targetSource = "http://xxxxxxx/svn/xxxx/xxxx/";
string uriDest = "C:/Documents and Settings/user/My documents/Jesus/project/test";
client.CheckOut(new Uri(targetSource), uriDest, SvnRevision.Head.Revision, true);
虽然缺少身份验证,但如果我尝试运行此代码,我会在项目的 Main () 中收到以下错误:
“混合模式程序集是使用版本“v2.0.50727”运行时编译的,如果没有额外的配置信息,则无法在运行时 4.0 中加载。”
最佳答案
把这个放在你的配置文件中:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
</configuration>
似乎所使用的库不是针对 .NET 4.0 运行时构建的。
关于c# - 在 Visual Studio 2010 中与 C# 的 Subversion 连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3879301/