3

I often get blue question marks on files in my VS2012 Solution Explorer when opening a solution bound to Perforce through P4VS.

Looks like something is having trouble to "synchronize" with the depot/workspace/whatnot. Hitting "Refresh View" always solves the issue but I'm growing tired on doing this everyday:

Screenshot

This is my VS version:

Microsoft Visual Studio Professional 2012
Version 11.0.61030.00 Update 4

And P4VS:

2014.1.85.4506

This is persistent across P4VS versions for a few months now, and seems to be affecting sometimes individual files, sometimes entire projects, with no apparent pattern.

How can I diagnose what's going wrong, be it a server issue, a VS issue, a workspace issue?... The Perforce Source Control output shows nothing special.


Actually it's not entire folders, it's entire projects. It appears that even if refreshing a project "fixes" the issue for one run, re-opening the solution brings it back. Whereas I think that for individual files, refreshing them solves the issue once and for all. I'll play with it a bit more to confirm that.

Laurent Couvidou
  • 32,354
  • 3
  • 30
  • 46

3 Answers3

2

To help diagnose what is going wrong you should probably turn on logging, and check the preferences that will show everything in the output window. For the P4VS log, go to:

     Tools- > Options -> Source Control -> Perforce - Logging

(This is not the same thing as the Visual Studio Activity log.)

There could be a possibility that you are getting disconnected and refresh reconnects you. I am not sure if you have your connection set to use solution-specific settings, since you did not mention the connection dialog coming up.

P4Shimada
  • 758
  • 4
  • 8
  • No I don't use solution-specific settings. I use "Show the Perforce Connection dialog", which indeed shows every time I open a solution. And logs are surprisingly quiet about blue-question-marked files: no mention of them. – Laurent Couvidou Aug 20 '14 at 08:13
  • Actually it could be that those files are the only ones *missing* from the log. No `fstat` whatsoever on them, *until* I right-click-Refresh View them. – Laurent Couvidou Aug 20 '14 at 08:16
  • Ok. Thanks for confirming. Are you using "Treat Projects/Solutions as directories"? (In case this could be related to solution/project structure and how those are being refreshed). With the back and forth to get details it may be best to open a support case by emailing support@perforce.com. We want to help you get this resolved and figured out. – P4Shimada Aug 20 '14 at 23:20
  • No I'm not using this option. I'm emailing you right now. – Laurent Couvidou Aug 21 '14 at 07:11
  • Sounds good! I see your case number to Support and also alerted the P4VS developers about your support case in case they have feedback. – P4Shimada Aug 21 '14 at 21:11
  • OK apparently unticking the "Treat Solution/Projects as directories when selected" does work around the issue for me, at least for now. I'll add a separate answer to make things clear for other users, but thanks a lot for your time! – Laurent Couvidou Aug 22 '14 at 07:55
  • You're welcome! Glad that resolved the issue for you. – P4Shimada Aug 27 '14 at 21:06
2

This "solved" the issue for me, at least for the entire projects that went blue-question-marked:

1) Tools > Options

2) Source Control

3) Perforce - General

4) Tick the option "Treat Solution/Project as directory when selected"

Not sure why but that's one less annoyance for me every day. Thanks to Perforce support for suggesting that.

Laurent Couvidou
  • 32,354
  • 3
  • 30
  • 46
  • The option is now under Perforce - Data Retrieval. However, it no longer is a fix for this problem. – Samaursa May 10 '17 at 15:39
0

The file is probably not marked for version control. I noticed this icon in one file and opened Perforce to check. For whatever reason, this file was not marked for add in Perforce. After marking the file for add and submitting, the blue question mark went away.

Manish
  • 1,726
  • 3
  • 23
  • 29