Visual Studio 2010 paths

Status
Not open for further replies.

Zen Shepherd

Ars Tribunus Angusticlavius
6,877
Subscriptor
I'm starting to get to know VS2010 and find all of the different paths and directories a bit bewildering.

I've also run into some issues with it finding linked dlls; someone mentioned that VS2010 sets certain path info on installation, and then it isn't updated? Sounded weird to me.

Anyway, any recommendations for the best way to manage paths for the following setup would be appreciated:

  • The VS project/solution files are version controlled
  • Each person's repository is on a network drive / server
  • Relative paths are therefore desirable
  • A local path for the build/execution is also desirable

If in the project's "additional include directories" I use relative paths, where are they relative to, by default? The location of the project file? Will this get screwed up if I change the output and intermediate directories to a local path (rather than wherever the project is in the mapped network view?)

I've been having trouble getting VS2010 to find dlls -- it will compile correctly and link to the right functions (by linking a .lib file) but on execution won't find the dlls. When you run from within VS, it's my understanding it uses a different set of paths than when running from the command line (which uses the windows PATH, right?)

I apologize if some of these seem like basic questions, but it doesn't seem very intuitive and googling has only resulted in partial answers.
 

Richard Berg

Ars Legatus Legionis
43,037
Subscriptor
All compile/link-time dependencies belong in version control. Don't pull anything from the local OS; that's just asking for trouble.

And don't put VC workspaces on a network drive unless you want compiles to take 100X longer.

For more specifics, it would help to know which project systems you're using and what your company's makefiles (msbuild targets) look like.
 

Zen Shepherd

Ars Tribunus Angusticlavius
6,877
Subscriptor
Yeah; I'm wondering how to keep the project in version control on the server and have the compiling/debugging/etc occur locally, for speed.

I'm not sure what additional info you're looking for; most of the builds are actually done for embedded devices; we do some development platform builds (nothing crazy sophisticated) within Visual Studio.
 
Yeah; I'm wondering how to keep the project in version control on the server and have the compiling/debugging/etc occur locally, for speed.
Typically the developer checks out a project from the repository and then has a working directory on his local computer, which he edits, debugs, etc. on his local system. Then he can commit/push his changes back to the repository when they're ready.

It sounds like you're intending for the working directories to be on the server, which sounds pretty odd to me.
 

technophile

Ars Legatus Legionis
23,768
Richard Berg":uxa5kd55 said:
All compile/link-time dependencies belong in version control.
The one exception that I think makes sense is if you're using something like NuGet package restore. You just have to be aware of it in case you're working without internet access or something, but it does simplify the need to keep the VCS updated with something that, to be honest, is basically already version-controlled somewhere else anyway.
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
The "reference paths" part of managed projects is set absolutely rather than relatively but is defined in user specific project files. Not sure if the C++ ones do something similar off the top of my HEAD.

You still keep everything relative to each other, it just let's individual developers choose a 'root' on their local box. Using a remote drive here is madness, just get a good backup solution (in addition to using source control).

For executing stuff that relies on finding unmanaged DLLs (so app directory, the side by side cache, PATH env variable etc) you needed to think about how you plan to do this on your actual production boxes.

Your development environment should replicate it as closely as possible.
 

fitten

Ars Legatus Legionis
55,636
Subscriptor++
jxl":6ca7hw0y said:
We use NuGet at work, but also we stuff the binaries it references into source control.
Outside of someone forgetting to commit binaries alongside a reference to them, it's been pain-free.

Why do you do this? Are they third party binaries? We reference those but we have a development VM that's set up with all the appropriate dependencies (when one is updated, we update the master VM and everyone gets a new copy). Everyone develops in basically the same environment that way and you don't have to worry about taint... just start over from a 'clean' (with all dependencies set up) snapshot for each bug report/project/whatever. Once you commit, delete that whole branch of snapshots and start clean again if the bug is reopened.
 
jxl":1x226vbk said:
Thanks to the wonders of Symantec products, our development machines are barely robust enough to develop on, much less develop in a VM on. That said, we generally all work in the same few (large) projects, so it's not like we have much of an issue with binary pollution.

I too am stuck with craptastic dev. machines groaning under the burden of AV and asset management products. Past time for a revolution here - setups like Fitten's sound great.
 
Status
Not open for further replies.