Jonathan Wood
Jonathan Wood

Reputation: 67175

Creating Linked Files in Visual Studio

I'm working with a large webforms solution in Visual Studio 2012.

I notice that I have several ASCX files listed (no code-behind files) in one project but when I click on one, it takes me to the same file in another project (same solution). Also, when I highlight one of these files, it shows the full path to be the file in the other project.

I need to do the same for a new ASCX file that I've just created.

However, after considerable time, I cannot see how such a reference to a file in another project was created this way, or how I can add my own.

Can anyone offer a clue?

Upvotes: 1

Views: 544

Answers (1)

Z .
Z .

Reputation: 12837

Drag the file(s) from the original project to the new project holding the ALT key. The mouse cursor should change to a shortcut icon.

Alternatively, you can go to the new project and say "Add Existing Item". Then, in the bottom of the open dialog, change "Add" to "Add as Link".

Upvotes: 1

Related Questions