2010-10-07 47 views
2

我正在使用與顛覆Sharpsvn庫連接,但我總是得到一個錯誤。 的代碼如下:顛覆與Visual Studio 2010中的C#的連接

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():

「混合-mode程序集使用版本'v2.0.50727'運行時編譯,無法在運行時4.0加載,無需其他配置信息。「

回答

2

把這個在您的配置文件:

<configuration> 
    <startup useLegacyV2RuntimeActivationPolicy="true"> 
     <supportedRuntime version="v4.0"/> 
    </startup> 
</configuration> 

看來,使用圖書館未建針對.NET 4.0運行時。

+0

非常感謝!我現在工作正常。 我已經證明可以做結帳,並且完全正確。我想知道的是如何確定下載目錄的大小是在進度條中顯示進程 – 2010-10-07 07:30:49