Can't connect to P4

Sep 17, 2011 at 12:11 AM

Was excited to try this, but I can't get it to connect to P4.

I am opening P4 and copy/pasting the server/workspace info.  I plug it into the VS2P4 Options, but if I click Test is says "Not a valid workspace".  Hogwash, it's valid.  I'm looking right at it in P4. :).

Only thing I can think of is that our server is off port 1999, so I enter [server]:1999 for the server.  Maybe it can't handle that?

If the VS Output is says (actual values replaced with [] placeholders):

Information: Connected to [server]:1999 as [username] and workspace [workspace]

Error: P4Service.Connect() ArgumentException unable to connect. Server [server]:1999, Workspace [workspace]



Sep 17, 2011 at 12:43 AM

I wonder if you are connecting directly (based on information you entered into the Tools+Options+Source Control+VS2P4 Options dialog) or if you are using P4Config (with that dialog set to "Use P4Config instead"?

If one of them doesn't work, the other might, and that would be very helpful info. I have found P4Config to be more reliable. 

Note the docs section as shown below:

Added "Use P4Config instead" checkbox to Options

  • Checking it causes connections to be based on the environment (e.g. P4Config) instead of explicit settings. 
  •  This allows you to connect to different Perforce servers and workspaces without changing VS2P4 Options. 
  •  Note that the connection is based on the location of the solution file.  
  •  e.g. environment variable P4CONFIG might be set to p4.cfg. The p4.cfg file at the root of a workspace might contain: 
    •  P4PORT=perforce:1666 
    •  P4USER=Dale.Brubaker

If you solve this problem, I hope you'll share it with others. We're at 2,204 downloads, and I'm surprised so few problems have been reported.