P4VS Source Control Binding Error On Startup

2k views Asked by At

I'm developing a C# solution in Visual Studio 2013 under Perforce source control (P4VS plug-in). When I first load Visual Studio I can perform a connection to my perforce depot no problem. Then I select "Choose Solution/Project in Perforce Depot" to open my project...

This is where the fun starts. In the P4 file chooser window I can see my Depot (good) and I can navigate its directories (also good). However when I expand any of the directories I receive an error the Perforce Source Control output window. Say for example I expand the Depot root directory, I receive the following (error) message:

E_WARN: //depot/* - file(s) not in client view

And so on for every directory I expand.

Now there's even more fun when I open my solution file, I get the dreaded "Source Control - Unable to Access Database" warning dialog. It contains the following:

The associate source control plug-in is not installed or could not be initialized.

  • Temporarily work uncontrolled - Microsoft Visual Studio will attempt to reconnect the solution or project to source control after closing and reopening the solution

  • Work offline in disconnected mode (greyed out... I won't go into the detail)

  • Permanently remove source control association bindings

I select "Temporarily work uncontrolled" and the solution is loaded outside of Perforce source control. Not good.

Now in order to open the solution under source control I have to go to Tools -> Options -> Source Control and re-select P4VS as my source control plug-in and then reopen the same solution that I have open outside of source control. This works fine and I now have the solution open under Perforce Source Control.

My guess is this has SOMETHING to do with the source control bindings, however I haven't the slightest clue how to handle such a problem. As always all help is appreciated!

2

There are 2 answers

0
P4Shimada On

Sorry you ran into challenges. Often times the error:

E_WARN: //depot/* - file(s) not in client view

points to an issue with the client workspace configuration ('View' file map field) needing to be modified. Not enough details to know for sure if this is your exact issue with the Perforce client that is being used to manage the Visual Studio project. See 'Refining workspace views' under Configuring P4 in the Perforce User Guide.

In terms of bindings: Not sure if you used a previous source control, but if a project was used with another plugin (even P4SCC) you must first remove those source control bindings.

For reference, here are some step-by-step docs on using P4VS with Visual Studio with new or existing projects:

http://answers.perforce.com/articles/KB_Article/Create-New-VS-2010-Project-in-Perforce-using-P4VS

http://answers.perforce.com/articles/KB_Article/Add-VS-2010-Project-to-Perforce-using-P4VS

I hope this has been somewhat helpful. Perforce Support [email protected] can further assist you as well.

0
Freestyle076 On

I'm still not sure as to why the

source control plug-in not installed or could not initialize

warning appears, however I've figured out the

E_WARN: //depot/* - file(s) not in client view

messages. It's due to some voids in my workspace mapping. My depot is under this structure...

//depot/sub/sub2/sub3/project_folder

whereas my workspace is configured as follows...

//workspace/project_folder

thus every time I navigated in visual studio through the perforce depot, looking for the project to open, any depot directories that didn't have a matching workspace directory posted this warning.

Makes sense, the files I was viewing in the depot were "not in client view", client being my client side P4V.

Hope this helps clarify part-way for anyone having a similar problem.