Transitive Dependency causing Conflicting version of same DLL

前端 未结 1 1950
醉酒成梦
醉酒成梦 2021-02-04 13:03

What is the best practice in the .NET world to manage transitive dependencies that cause version conflict ?

In details : Project A Depends on Project B which in turn de

1条回答
  •  自闭症患者
    2021-02-04 13:17

    There are a lot of similar questions On Stack Overflow. For e.g. Referencing 2 different versions of log4net in the same solution

    Summary:

    1. Ensure that you deploy the assembly C in folders 1.0 and 2.0 respectively within the folder containing the main executable.
    2. Change app.config file and include something like following:
     
       
        
          
           
            
            
           
          
        
       
     
    

    you can get the public key token of C using sn -T C.dll

    If v1.0 and v2.0 of C have different public key (though ideally they shouldn't) then include two dependentAssembly tags.

    0 讨论(0)
提交回复
热议问题