How do I add a linked file to the 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 item…’ and in the file dialog, 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 resides in the ‘My Project’ folder. Simply dragging it into the locating in Solution Explorer is not allowed. The file is added successfully but it is in the root of my project. I want it inside the ‘My Project’ folder.
Anyone know how to do this?
P.S. C# folks, I know this same thing can be done and you can drag the file into the ‘Properties’ folder which is where the AssemblyInfo.cs file resides in C# projects. So in C# not a problem; just VB.NET.
You didn’t originally say which version you’re referring to, but I had VS2010 open when I answered the question.
Instead of Drag’n’Drop, with the mouse, Cut’n’Paste, with the keyboard, works!
That is, create the linked file in the top level, then select it and type Ctrl+X to Cut, then select a file within the
My Projectfolder (with Show All Files on) and type Ctrl+V to Paste.