Use different versions of referenced DLL

后端 未结 2 1120
挽巷
挽巷 2021-01-02 05:32

Somehow I\'ve been lucky and never had to deal with this problem, even though I think it\'s a common one:

I\'ve got a web project, let\'s call it SomeProject

相关标签:
2条回答
  • 2021-01-02 06:02

    Putting both versions of SomeThirdParty into GAC should do what you want. Use gacutil utility or Start->Run->assembly then drag-n-drop.

    0 讨论(0)
  • 2021-01-02 06:06

    From my answer earlier: https://stackoverflow.com/a/19576769/2367343

    I ran into this yesterday for visual studio web developer using Oracle.DataAccess.dll.

    My solution,

    right click your project (*.csproj) and edit it.

    Right underneath:

    <PropertyGroup>
    

    Place

    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    

    Then rebuild your solution. You must separate the two version dlls into two different directories in your project when including them (required).

    I did

    ora11 >> Oracle.DataAccess.dll (Version 11)
    
    ora9 >> Oracle.DataAccess.dll (Version 9)
    

    Doing this allows your IDE to use both versions of DLLs.

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