Jump to content

P4VS prompts to save VS solution every time.

P4VS Solution VisualStudio

  • Please log in to reply
4 replies to this topic

#1 kbrizov



  • Members
  • Pip
  • 1 posts

Posted 10 July 2018 - 07:40 AM

Hello guys,

I installed the P4VS extension from NuGet. After that, I managed to connect to a Perforce Depot and a Workplace. Every time I open my VS solution (.sln) I get prompted to connect. I connect successfully and everything works. What is bothering me is that every time I close my Visual Studio I get prompted to save my solution as if I have modified it. No matter what option I select (Save, Don't save) the next time I open and later close the solution I get prompted to save again. It seems that the .sln file is not modified at all. This can be troublesome because my workflow involves a lot of opening/closing my solution. Put that aside and there is a bigger issue. This means that I can potentially save a .sln change I made by mistake and I wouldn't even know. Perhaps something in my configuration is wrong. I have a .p4ignore file that ignores the solution file, but nothing I did solves the issue. It seems that the .sln file does not have a read-only flag. Anyone else experiencing this? I'm using Visual Studio 2017 community.

Best regards,

#2 p4bill


    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted 11 July 2018 - 09:17 PM


It sounds like you have the solution ignored, so it will not be added to a Perforce depot. Since it is not checked in, it will be writable without being checked out. What could be happening is that P4VS  is writing source control information to the .suo file and Visual Studio reads this as an edit of the solution file.

A few questions:

What version of P4VS are you using? This can be found on the connection dialog.

Do you not want to have the .sln file under source control? (i.e. the ignore was intentional and not just an attempt to stop the prompt to save the file).

Could you confirm that this does not happen if you disable P4VS. Tools->Extensions and Updates: select P4VS [Disable] and restart Visual Studio.

Can you confirm that the file is not changed? Open the .sln in a text editor, save it as a different name, Open the .sln in Visual Studio and save it when closing the solution. Then diff the 2 .sln files

#3 agraham



  • Members
  • Pip
  • 3 posts

Posted Yesterday, 09:08 PM

I'm having this problem too.

#4 p4bill


    Advanced Member

  • Members
  • PipPipPip
  • 136 posts

Posted Yesterday, 09:12 PM

Are either of you able to respond to the additional questions above? We first want to confirm that the solution file itself has not changed in this scenario.

#5 m_parker



  • Members
  • Pip
  • 4 posts
  • LocationChicago, IL

Posted Yesterday, 10:39 PM

I am seeing the same issue.  First, when prompting to save, VS wanted to add a section like this every time at the bottom of the solution:
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {D3DAA774-B248-4D09-BCC5-9536C04AB3AC}
but we then checked it in with this and now it prompts to check out but the files are identical.  It seems to prompt at the time when the user first builds it.
  • P4VS version 2018.2.166.5359
  • Solution not in ignore file, marked as controlled by P4VS
  • With P4VS disabled, there is no prompt and it builds fine.
  • The file is definitely unchanged.

Also tagged with one or more of these keywords: P4VS, Solution, VisualStudio

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users