如何解决[否的方式来解决之间的&QUOT冲突;错误? [英] How to fix "No way to resolve conflict between" error?

查看:255
本文介绍了如何解决[否的方式来解决之间的&QUOT冲突;错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近添加log4net.dll我们的数据对象。我们的数据对象建立完美的,但是当你尝试建立任何引用您会收到以下错误我们的数据对象:

Recently added log4net.dll to our data object. Our data object builds perfectly but when you try to build anything that references our data object you get the following error:

没有办法解决冲突log4net的,版本= 1.2.10.0,文化=中性公钥= 692fbea5521e1304和log4net的,版本= 1.2.9.0,文化=中性公钥= b32731d11ce58905。选择log4net的,版本= 1.2.10.0,文化=中性公钥= 692fbea5521e1304随便。

No way to resolve conflict between "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" and "log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905". Choosing "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" arbitrarily.

我发现下面的<一个href="http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depen">thread这使我能够获取有关问题的更多信息。

I found the following thread that enabled me to get more information about the problem.

log4net的是用于各种事情在我们的项目。例如,晶1.2.9安装到GAC。我知道infragictics使用1.2.10。

log4net is used for a variety of things in our project. For example, crystal installed 1.2.9 into the GAC. I know infragictics uses 1.2.10.

我们有一个特定的目录 - 称之为 C:\引用 - 在这里我们建立我们所有的DLL文件,而我们所有的应用程序都使用引用我们的内部的DLL。所以,我专门设置我引用我们的数据对象到c:\引用\ log4net.dll这是1.2.11版本。这是奇怪,因为在你上面的错误消息,不看1.2.11。 DLL被引用的特定版本:= TRUE&放大器;复制本地:= TRUE。我查了build目录和放大器; log4net的的1.2.11没有得到正确地移动。

We have a specific directory - call it c:\references - where we build all our dlls to and that all our applications use to reference our internal dlls. So I specifically set my reference in our data object to c:\references\log4net.dll which is version 1.2.11. Which is weird because in the error message above you don't see 1.2.11. The dll is referenced with specific version: = True & Copy Local:= True. I checked the build directory & 1.2.11 of log4net did get moved correctly.

如果它帮助这里有一些详细的错误信息:

If it helps here are some of the detailed error messages:

There was a conflict between "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" and "log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905".
  No way to resolve conflict between "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" and "log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905". Choosing "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" arbitrarily.
      References which depend on "log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" [C:\Windows\assembly\GAC_32\log4net\1.2.10.0__692fbea5521e1304\log4net.dll].
          C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll

   References which depend on "log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905" [C:\Program Files (x86)\Business Objects\Common\4.0\managed\log4net.dll].          c:\references\DBObjectAdoNet.dll
            Project file item includes which caused reference "c:\references\DBObjectAdoNet.dll".

更新:到目前为止,我发现修复错误的唯一方法是引用log4net的在任何引用DBObjectAdoNet.dll。这是不是真的对我们来说,因为近一个可用的解决方案 一切都在我们的整个系统中使用它。

Update: So far the only way I found to fix the error is to reference log4net in anything referencing DBObjectAdoNet.dll. This isn't really a usable solution for us since almost everything in our entire system uses it.

2日更新:试图把log4net的在GAC以为会解决这个问题,但仍然没有去

2nd Update: Tried putting log4net in the GAC thinking that would fix the problem but still no go.

第三更新:我做了一个支持电话给微软。他们要我使用Assembly.LoadFrom(),我感到非常,非常犹豫做到,因为我们做了30多万电话在一个应用程序,并需要反思的每次调用它会慢下来不少。

3rd Update: I've made a support call to Microsoft. They want me to use Assembly.LoadFrom() which I'm very, very hesitant to do since we make over 300,000 calls in one application and would require reflection for each call which would slow things down quite a bit.

我发现,如果我卸载我的机器上晶体运行时错误消失不做出很大的意义,因为这样做,据我可以告诉的唯一事情,就是从删除log4net的1.2.10.0海关总署在.NET Framework 2.0的文件夹,这不应该的问题,因为该应用程序是一个.NET Framework 4的应用程序。

I found out if I uninstall the crystal runtime on my machine the error goes away which doesn't make a lot of sense because the only thing it does, as far as I can tell, is remove log4net 1.2.10.0 from the GAC under the .NET framework 2.0 folders, which shouldn't matter because the app is a .NET framework 4 app.

推荐答案

我们发现,水晶运行时肯定是这个问题。如果我们卸载log4net的在%WINDIR%\组装所安装水晶运行则警告信息消失。有什么奇怪的是,如果我安装的log4net 1.2.10从log4net的站点到GAC则警告消息没有再出现。如果任何人都可以解释,那么请加入到这个线程。水晶签署log4net的用自己的强名称密钥(公钥标记是不同的)。

We found out that crystal runtime was definitely the problem. If we uninstall log4net at %windir%\assembly that crystal runtime installed then the warning message goes away. What's weird is that if I install log4net 1.2.10 from log4net's site into the GAC then the warning message doesn't reappear. If anyone can explain that then please add to this thread. Crystal signed log4net with their own strong name key (the public key token is different).

的关键,固定log4net的问题是,log4net的是一个开源项目。这意味着我们可以简单地使用不同的名称从源代码编译的DLL。有没有尝试过了,不过也应该解决这个问题。我们必须从源头,我们要更新log4net的每一次构建,但考虑到有多少我们要更新DLL这不是什么大不了的额外步骤。

The key to fixing the log4net problem is that log4net is a open source project. Which means we can simply build the dll from source with a different name. Haven't tried it out yet but that should fix the problem. We'll have the extra step of building from source every time we want to update log4net but considering how much we are going to update the dll it isn't a big deal.

这篇关于如何解决[否的方式来解决之间的&QUOT冲突;错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆