Random useless changes to Vault section of solution files
Moderator: SourceGear
Random useless changes to Vault section of solution files
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 (283.77 KiB) Viewed 10561 times
Re: Random useless changes to Vault section of solution file
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.
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
SourceGear
Re: Random useless changes to Vault section of solution file
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.
Re: Random useless changes to Vault section of solution file
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?
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
SourceGear
Re: Random useless changes to Vault section of solution file
Has anyone found a fix for this issue? It is happening to us as well. We are using the same versions as the OP.
Re: Random useless changes to Vault section of solution file
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.
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
SourceGear
Re: Random useless changes to Vault section of solution 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?"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.
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!
Re: Random useless changes to Vault section of solution file
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.
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
SourceGear