Question

I've created a small console application using p4api.net which builds a changelist of files having particular attributes. So far so good, but it's unable to connect if I already have an existing connection open (like if I have an open instance of P4V, for example).

Is there a way to attach to an existing P4 connection, rather than having to close that connection and create a new one within my app?

Was it helpful?

Solution

The issue seems to be that I was attempting to create a new connection to a repository I was already connected to. I found that if I leave the port/server, client/workspace, and user fields as empty strings when initializing the connection it would take those settings from my P4 environment variables and connect correctly, regardless of whether I had a connection already open or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top