“Add existing item” in Visual Studio: is it possible to make “Add as link” default?

陌路散爱 提交于 2019-12-03 03:17:29
Erdogan Kurtur

Unfortunately, there is no option for that. But there is silver lining. You can drag files to a project and drop them to desired folder. Files are copied to your project. If you press Alt key doing drag and drop operation, files are not copied but linked instead.

You can also use VSCommands extension which adds 'Copy as Link' on folders and files in Solution Explorer. After that you can do 'Paste Link' in desired location. It also allows you to navigate to source item from linked item via 'Locate Source File' from cotnext menu. Works with vs2010 and vs2012.

It appears that when you "Add Existing" to a SOLUTION FOLDER(as opposed to an actual folder), then you are always adding these items as a link. If you add existing items to an actual folder, then you get the button that gives the option for "Add as Link".

Simply Edit project file and change the path of the file. You can relatively move folder up using ../ It starts in the project folder.

I found an nice tip here: If you want to add an existing item as link in VS C# Express 2010 in the "Add existing item" dialog you have to explicitly choose Add As Link from the dropdown on the Add button.

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