Best practice to share common libraries between solutions in .NET

后端 未结 3 2123
渐次进展
渐次进展 2021-02-16 00:09

We have pool of MSVS solutions (Solution \"A\", \"B\", \"C\", ... ) that share basic functionality in assembly called \"Common.dll\".

There are 3-5 active solutions (th

3条回答
  •  你的背包
    2021-02-16 00:29

    I'd say discount (A) straight away, as you will kill any capability you have for maintainability!

    Effectively, it does come down to how often these code bases will change.

    Our curent solution on a similar setup I'm working on is to have a seperate 'Common' project, and the binaries are copied to the 'Libs' folder for each Project that references the Common one. The reason for this is that we then have the capability to deploy explicit versions of common.dll to each project. The Libs folder is maintained via TFS. So whilst the parent project does not need to be recompiled, TFS will see a new check in and can act accordingly.

    Your other option which I'd consider is to reference the common project 'in situ' as per one of the solutions at this link. Note though that this limits your ability to reference different versions of common unless you are creating seperate project versions for each physical version, which would be unlikely and unadvisable, again due to maintainability.

提交回复
热议问题