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

前端 未结 5 1781
臣服心动
臣服心动 2021-02-05 15:12

As pointed out in this SO answer, the Add > Existing item dialog in Visual Studio by default displays the Add button (meaning that the selected items will be p

相关标签:
5条回答
  • 2021-02-05 15:22

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

    0 讨论(0)
  • 2021-02-05 15:26

    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.

    0 讨论(0)
  • 2021-02-05 15:30

    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.

    0 讨论(0)
  • 2021-02-05 15:31

    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.

    0 讨论(0)
  • 2021-02-05 15:32

    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".

    0 讨论(0)
提交回复
热议问题