views:

840

answers:

5

I just wonder what the best approach is to have multiple users work on a Project in Visual Studio 2005 Professional.

We got a Solution with multiple Class Libraries, but when everyone opens the solution, we keep getting the "X was modified, Reload/Discard?" prompt all the time. Just opening one project is an obvious alternative, but I find it harder to use as you can't just see some of the other classes in other projects that way.

Are there any Guidelines for Team Development with VS2005 Pro?

Edit: Thanks. The current environment is a bit limited in the sense there is only 1 PC with RDP Connection, but that will change in the future. Marking the first answer as Accepted, but they are all good :)

+2  A: 

Use source control to keep a central repository of all your code. Then each user checks out their own copy of the source code and works locally. Then submits only the code that changed.

http://en.wikipedia.org/wiki/Revision_control

Mark Ingram
+5  A: 

What you need is source control.

You should definitely not open the same files over the network on multiple machines. For one thing, Visual Studio has safeguards in place to prevent you from modifying certain files during a build, but it has none of that that will prevent others from modifying the same files over the network.

By setting up source control, each developer will have a separate copy of the files locally on his or her developer machine, and periodically communicate with the source control system to check in/commit changes. After that, other developers can ask for the latest updates when they're ready to retrieve them.

Lasse V. Karlsen
+1  A: 

This might sound snide, but if you're opening up the solution from a shared location then you're doing something wrong. If that's the case then you should start using source control (something like Subversion) and have everyone check out a copy of the project to work on.

However if you're already using source control, then it might be a symptom of having the wrong things checked in. I find that you only need the sln, and the vcproj under source control.

Otherwise I don't know...

Daemin
+1  A: 

You should definitely, definitely be working with source control!

This will help stop the collisions that are occurring. Also, if you are making changes to the shared projects this often that it is a problem, then also ensure that all code is tested before getting checked in (otherwise they may bust someone else's build), but make sure they check in often (or time gained from not dealing with prompts will be lost in merging conflicts) :)

Rob Cooper
+2  A: 

A number of people have recommended using source control and I totally agree. However you also need do the following.

  • Exclude your personal options files from the repository (eg your .suo files)
  • Exclude your App.config files from the repository. - Not entirely but you need to have a Template.App.config. You commit that instead, and only copy your App.config into the Template.App.config when you make structural changes. That was each user has their own individual config for testing.

There are probably some other files worth excluding (obj directories and so forth) but thats all I can think of right now.

Peter

Vagnerr