Project References DLL version hell

后端 未结 10 1154
离开以前
离开以前 2020-12-28 16:19

We\'re having problems getting visual studio to pick up the latest version of a DLL from one of our projects.

We have multiple class library projects (e.g. Business

10条回答
  •  清酒与你
    2020-12-28 16:58

    To avoid the dll hell I would recommend you to create a lib folder inside your project and put all shared assemblies in this folder. Next you Add References only from this folder. This way your project is self contained and you know exactly where it is picking the references from. If you want to update some assembly with a newer version you copy it to the lib folder and rebuild your project.

    Also make sure you don't the referenced assemblies into the GAC as they might be picked up first.

提交回复
热议问题