Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm new to visual studio, coming from Delphi.

I have a directory tree full of .cs files (root is Common).
I also have a directory tree full of Applications (root is Applications)
Finally, I've got a tree full of Assemblies (root is Assemblies)

I'd like to keep my .cs files in the Common tree and all the environment voodoo (solutions, projects, settings, metadata, debug data, bin, etc.) in the Assmblies tree. So, for a simple example, I've got an assembly called PdMagic.Common.Math.dll. The Solution and project is located in AssembliesCommonMath. All of its source (.cs) files are in CommonMath. (matrix.cs, trig.cs, mathtypes.cs, mathfuncs.cs, stats.cs, etc.)

When I use Add Existing Item to add matrix.cs to my project, a copy of it is added to the AssembliesCommonMath folder. I just want to reference it. I don't want multiple copies laying around. I've tried Add Existing Item, and used the drop down to "Add link" rather than just "Add", and that seems to do what I want.

Question: What is the "best practice" for this sort of thing? Do most people just put those .cs files all in the same folder as the project? Why isn't "Add link" the default?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
163 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can just use Add As Link by clicking on the little down arrow to the right of the add button from Add-->Existing Item command...

(Thanks Peter)

Whilst I realise this is not in an answer to the original question (which regards best practices), I present this answer in order to save the time of others who have been directed here by the misleading title of this question.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...