Visual Studio: Add same project or reference to different solutions

旧时模样 提交于 2019-12-06 01:21:18

The way I handle this is to create a solution for just the common code project. Build the library, then publish it in a common location. You might want to name or otherwise keep different versions of the same library distinct in this location. Then I include a reference to the published libraries in any solutions/projects that need them. Since I often share these and my solutions with other developers, I tend to keep them on a network share and reference them using UNC paths to avoid naming issues with respect to drive letters when sharing my code.

Using versioning in your libraries allows you the ability to upgrade dependent projects on your timeline rather than forcing you to upgrade all whenever a change is made or having to maintain your code in several places. Note that the more people you have using the common code the more important that this is.

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