How to add a linked file to the My Project folder in a VB.NET project?

How to add linked file to My project folder in VB.NET in VS.NET 2010? A “linked” file is when you right-click a project in VS.NET, select “Add → Existing Element ...” and in the file’s dialog box, click the arrow to say “Add as Link”.

I am trying to add a shared solutionInfo.vb file to my project, but I want it next to the AssemblyInfo.vb file, which is located in the My Project folder. Simply dragging it to a location in Solution Explorer is prohibited. The file was added successfully, but it is at the root of my project. I want it in the My Project folder.

Does anyone know how to do this?

PS People C #, I know that this can be done, and you can drag the file into the "Properties" folder, where the AssemblyInfo.cs file is located in C # projects. So in C # there is no problem; just VB.NET.

+4
source share
1 answer

You did not initially say which version you are accessing, but I had VS2010 when I answered the question.

Instead of Drag'n'Drop, with the mouse, Cut'n'Paste with the keyboard works!

That is, create a linked file at the top level, then select it and type Ctrl + X to cut, then select the file in the My Project folder (using Show all files) and type Ctrl + V paste.

+7
source

All Articles