2016-03-14 109 views
1

我的朋友给了我一个在Xamarin Studio中创建的项目。当我尝试运行项目时,我收到了与冲突程序集引用有关的警告。更改冲突的装配参考

我用AsmSpy工具来检查哪些引用是相互矛盾的,我得到了以下的输出:

Detailing only conflicting assembly references. 
Reference: Newtonsoft.Json 
    6.0.0.0 by Akavache  <-- this one is Green 
    6.0.0.0 by Akavache.Sqlite3  <-- this one is Green 
    8.0.0.0 by MyAppName  <-- this one is Red 

Reference: Splat 
    1.6.0.0 by Akavache 
    1.6.0.0 by Akavache.Sqlite3 
    1.6.2.0 by MyAppName 

我从来没有与Xamarin工作室工作,我缺乏这方面的话题有一定的了解。如何更改引用来停止此警告?

回答

2

您应该可以使用程序集重定向来'碰撞'所有程序集以使用特定版本。

(你将需要更新名称,公钥和相应的版本)

<dependentAssembly> 
     <assemblyIdentity name="Akavache" publicKeyToken="1234567890" culture="neutral" /> 
     <bindingRedirect oldVersion="1.0.0.0-8.0.0.0" newVersion="8.0.0.0" /> 
     </dependentAssembly> 

这些都需要在运行时节点的* config文件;

<runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">