Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio relative reference path

I usually format my project directory like J-P Boodhoo. a main dir containing solution file, then a lib folder for all third-party lib, a src dir, a tools lib for third-party that wont be deployed.... For more info look here

I set in my project the reference path for all the needed folder, but if a developper checkout the trunk, he have to set all the reference path. Is there a way to simplify this ?

And am I using Visual Studio 2008.

Thank you.

like image 600
pmlarocque Avatar asked Sep 24 '08 18:09

pmlarocque


People also ask

How do I get the relative path of a file in Visual Studio code?

Relative Path Extension for VS CodePress Ctrl+Shift+H (Mac: Cmd+Shift+H ) and start typing the file you want.

How do I change the reference path in Visual Studio?

If you're using Visual Basic, select the References page, and then click the Reference Paths button. In the Reference Paths dialog box, type the path of the folder that contains the item you want to reference in the Folder field, and then click the Add Folder button. If you're using C#, select the Reference Paths page.

How do you reference a relative path?

Relative path Relative paths make use of two special symbols, a dot (.) and a double-dot (..), which translate into the current directory and the parent directory. Double dots are used for moving up in the hierarchy. A single dot represents the current directory itself.


1 Answers

I'm not sure which Visual Studio language you use, but if it's C++, then then file paths are stored in the .vcproj project file which should also be under version control. (NOTE: the .sln solution file does NOT store path settings) If you are careful to use relative, rather than absolute paths, it should be easily sharable among multiple developers.

In Visual C++ 2008, project files are XML so you can edit them directly. If you want to get really fancy, you can use .vsprops property sheets for additional control.

like image 136
jwfearn Avatar answered Sep 28 '22 07:09

jwfearn