Adding Existing Files To Different Visual Studio 2010 Project

心不动则不痛 提交于 2019-12-04 16:34:41

问题


It is possible to add files to a visual studio project that is located in a different directory however keep the files in those directories and update those file when you update the file in the project? When I add existing files to a project, all it does is copy them to the project and then update the copied files, not the original files. Is there any way to get it to work the other way?


回答1:


You should add them as a link/shortcut

Right-click the project, select Add > Existing Item, and in the dialog, "Add" drop down, select "Add As Link".




回答2:


  1. Open Visual Studio
  2. Right lick the solution Explorer and select Add | Existing item...
  3. Select the file and question, but in the "Add" drop down select Add as Link.

Alternatively I would suggest creating a class library project that you share in both solutions, this might benefit you in the future.



来源:https://stackoverflow.com/questions/4880844/adding-existing-files-to-different-visual-studio-2010-project

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