Sharing code between solutions in TFS [closed]

天大地大妈咪最大 提交于 2019-12-04 15:46:28

What I do is a version of what you called 'Binary sharing'. If you can think of your shared code as a 3rd party project, then you can apply the same rules for development that you would expect from a well run 3rd party project. That means that you should specifically version the shared code (with semVer or something similar) and maintain backwards compatibility wherever possible.

Yes, you are right, this means that if you find a bug in the shared code, you need to issue another version and then recompile the project that depends on this code.

However, it also means that if only one of the two projects dependent on the shared code needs the bug fix, only that project needs to take the new version.

Another benefit is that it is up to the project when to take the update. So you can manage the bug fixing process with more confidence.

So, to be clear, my suggestion would be to create a new TFS project for the shared code, give it all the love you would show to a 3rd party project (its own build, NuGet, etc), and then take a build assembly into a library folder for the projects that want to use it.

Hope this helps.

Thank you everyone for all your help, because several of you contributed to my final solution iIhave chosen to post what I ended up doing here.

What I ended up doing was both Binary sharing and code sharing

For the projects that is often updated and with relatively fast iterations I referenced the shared projects I needed and created project guidelines to ensure that the code was backwards compatible for specific amount of time.

For the projects that was updated less frequently I branched in the compiled binary. I also created versioned the shared project and created guidelines to ensure that any backwards compatibility conflicting code resulted in an increment of the main component of the version number.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!