Random useless changes to Vault section of solution files

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
gpeter
Posts: 4
Joined: Fri Feb 06, 2015 1:08 pm

Random useless changes to Vault section of solution files

Post by gpeter » Mon Jul 30, 2018 8:17 am

We are using Vault Standard 10.0.1 with Visual Studio 2017 15.7.5. Our problem is that Visual Studio constantly wants to save changes to the solution file, forcing us to constantly check out the solution file. The changes are always a reordering of the ProjectRelativeDiskPathX lines in the Vault source control section (see attached DiffMerge output). We can proceed with the build (or other action) only if we check the solution out. Later, whether we check in the useless changes, or undo the check out, the next time we do another build, Visual Studio will again want to save changes with a different semi-random reordering of the ProjectRelativeDiskPathX lines. This occurs regardless of whether we stay on the same workstation or switch to a different workstation. It is happening in multiple solutions. I'm not sure if this is more of a Vault or Visual Studio issue--we recently upgraded both. Though it doesn't prevent us from doing our work, it is getting to be annoying. Please help.
Attachments
SolutionDiff.JPG
SolutionDiff.JPG (283.77 KiB) Viewed 10576 times

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Random useless changes to Vault section of solution file

Post by jclausius » Mon Jul 30, 2018 9:35 am

The problem is not with Vault per se, but rather the fact that Visual Studio is editing the solution file, and invokes the Vault code that it plans on making a change to a file under source control.

When you work within Visual Studio, is someone making a change to one of the projects? When you save, are you invoking changes using the "Save All" button? Is it possible the build configuration (debug, release, platform, etc.) is being modified? If you could isolate what is making the change, you could cut down on the behavior.

If that doesn't work, off the top of my head a couple of different options:

1) Work like you're currently doing, allow the check out, and just undo.

2) Assuming you KNOW you are not making any changes to the solution (like adding or removing projects), you could leave the solution in Vault, and then just turn off the solution file's read-only flag. Changes would be made to the file, but if you work in "Check Out, Edit, and Check In" mode, the file would not show up in your pending changes

3) Remove just the solution file from source control, but then have developers make their own solution wrapping which projects they want to bind together under a single solution. This is the least favorable, as it can cause a lot of inconsistencies between developers.
Jeff Clausius
SourceGear

gpeter
Posts: 4
Joined: Fri Feb 06, 2015 1:08 pm

Re: Random useless changes to Vault section of solution file

Post by gpeter » Tue Jul 31, 2018 11:45 am

Thanks for your response. This problem occurs with no change to the solution or projects whatsoever--just load the solution and build (for example). The only changes Visual Studio wants to make to the solution file is the reordering in the source control section. I understand this could be a Visual Studio issue. I think I will go with your suggestion 2, which creates a "renegade", but that is okay because the solution rarely changes.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Random useless changes to Vault section of solution file

Post by jclausius » Tue Jul 31, 2018 12:13 pm

OK. It is one work-around I've used.

Out of curiosity, when you see a change with a build, do you use a build from the command line or from within Visual Studio?
Jeff Clausius
SourceGear

wakemup
Posts: 3
Joined: Sun Jan 01, 2012 7:05 pm

Re: Random useless changes to Vault section of solution file

Post by wakemup » Wed Aug 08, 2018 10:21 am

Has anyone found a fix for this issue? It is happening to us as well. We are using the same versions as the OP.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Random useless changes to Vault section of solution file

Post by jclausius » Wed Aug 08, 2018 10:38 am

What is the default build profile in the solution / project files? If those are changing, VS may be rearranging the file, and telling the Vault client to check out that file.

Otherwise, the only other real fix is to accommodate Visual Studio making changes to the file. - viewtopic.php?p=79433#p79433 , and ignoring them until you need to make a change.
Jeff Clausius
SourceGear

wakemup
Posts: 3
Joined: Sun Jan 01, 2012 7:05 pm

Re: Random useless changes to Vault section of solution file

Post by wakemup » Wed Aug 08, 2018 10:58 am

jclausius wrote:What is the default build profile in the solution / project files? If those are changing, VS may be rearranging the file, and telling the Vault client to check out that file.
Thanks for the response. Can you give me a little more information? What do you mean by "default build profile in the solution / project files?"

As with the OP, if I do a Get Latest Version, have no files checked out at all and go to build the solution, it wants to rearrange my projects (see SLN section below). I am not making *any* changes at all to anything. 1. Get Latest, 2. Build. Is there some setting in Vault or VS that you are talking about? Or some line in the CSPROJ or SLN file?

BEFORE:
GlobalSection(VaultVsipSolution-v2) = preSolution
VaultHost = http://XXX/VaultService
VaultRepositoryID = 4
VaultRepositoryGUID = b6efdc7f-8621-437a-8578-7c8a00528269
ProjectCount = 63
ProjectRelativeDiskPath1 = Jimmy.sln
ProjectRelativeDiskPath2 = Jimmy.sln
ProjectRelativeDiskPath3 = ..\DLLs\Project1\Project1.csproj
ProjectRelativeDiskPath4 = ..\DLLs\Project2\Project2.csproj
......................

AFTER:
GlobalSection(VaultVsipSolution-v2) = preSolution
VaultHost = http://XXX/VaultService
VaultRepositoryID = 4
VaultRepositoryGUID = b6efdc7f-8621-437a-8578-7c8a00528269
ProjectCount = 63
ProjectRelativeDiskPath1 = ..\DLLs\Project12\Project12.csproj
ProjectRelativeDiskPath2 = Jimmy.sln
ProjectRelativeDiskPath3 = ..\Services\Project22\Project22.csproj
ProjectRelativeDiskPath4 = ..\Tests\Project32\Project32.csproj
................



THANKS!

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Random useless changes to Vault section of solution file

Post by jclausius » Wed Aug 08, 2018 3:02 pm

I'm not a 100% expert on the internals of solution and project files, but for example, if you change the "startup" project within your solution, Visual Studio may re-order the projects found within the solution. In these cases, it won't make any changes to the content (meaning the lines are all present and accounted for), but will re-order them within the solution file:

http://web.archive.org/web/201201200602 ... /2557.aspx

So, I was suggesting to the OP that it may be possible something in their build process or some other idiosyncrasy within Visual Studio is causing the file to be modified, and thus triggering the issues that people have reported.
Jeff Clausius
SourceGear

Post Reply