Geeks With Blogs
Dave Chestnutt: SparklingCode and CodeGaffes Writing better code; for fun and profit
We've used Perforce source control for a number of years.  It's a great tool and it integrates with Visual Studio pretty well.  But its Visual Studio integration has one really annoying feature, that fortunately, you can work around.
The feature is this: If your solution has 10 projects in it, you can put each of those 10 projects in a separate Perforce Depot.  Is that useful?  I'll leave that to you.  Suffice it to say that we put all our source in one Depot.
The problem comes when you reload a solution.  Perforce, by default, wants to prompt you for login information - for each project in the solution.  We have some solutions with 20-30 projects, so this gets pretty annoying. 
This is the Perforce "Open Connection" screen that pops up over and over again:

Fortunately, you can suppress this dialog (assuming that you only use one Depot!)  The option is pretty well hidden, but here's how you get to it.  Open Visual Studio, and before you open your solution file, go to Tools - Options.  Select SCC provider on the left, and click the Advanced button:
This brings up the well-hidden Perforce dialog.  Switch to the Connection tab and click the option called: "Bind to the workspace that matches your Perforce environment settings"

Presto!  Press Ok to save your settings, and the Perforce "Open Connection" screen is banished, never to annoy you again.
This makes the Perforce integration fairly practical in Visual Studio.  It's not perfect, but it automatically checks out files for you (as you try to change them).  And that's extremely useful.
It just makes my day...
Posted on Tuesday, February 28, 2006 2:14 PM Visual Studio Tips , Perforce Tips | Back to top

Comments on this post: Visual Studio and Perforce: Suppress the Open Connection dialog

# re: Visual Studio and Perforce: Suppress the Open Connection dialog
Requesting Gravatar...
You have no idea how much frustration you have saved me. I recently got a new job. Im new to perforce. We dozens of solutions that each have dozens of projects that I have to work with on a daily basis. 'nuf said
Left by nick durcholz on May 29, 2008 9:37 AM

# re: Visual Studio and Perforce: Suppress the Open Connection dialog
Requesting Gravatar...
Thank you so much for the time savings this gives me. We're using one depot right now, so this is great! Will be sure to pass this on to the rest of our team.
Left by Mike Butler on Jul 07, 2008 1:47 AM

Your comment:
 (will show your gravatar)

Copyright © Dave Chestnutt | Powered by: