Eclipse有這個功能,在一個項目中加入另一個項目文件夾的引用,源碼包含過來,這樣不必copy一份代碼,只需要維護一份源代碼。一直想在VS中找到這個功能,目前項目需要,終於google到了。
http://stackoverflow.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鍵鼠標拖動項目文件或文件夾到另一個項目,則自動建立起鏈接。