VS2015 多项目源码共享链接

时间:2021-03-31 15:18:38

Eclipse有这个功能,在一个项目中加入另一个项目文件夹的引用,源码包含过来,这样不必copy一份代码,只需要维护一份源代码。一直想在VS中找到这个功能,目前项目需要,终于google到了。

http://*.com/questions/3610845/add-as-link-for-folders-in-visual-studio-projects

In VS2012 and later, you can drag a folder to another project with alt key pressed. It's just the same as adding each file as link manually but faster.
upd: Consider using Shared Projects if you are using VS2013 update 2 (with Shared Project Reference Manager) or VS2015.

一句话: 按住Alt键鼠标拖动项目文件或文件夹到另一个项目,则自动建立起链接。