Vault & NuGet Troubles

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

Moderator: SourceGear

Post Reply
ClaytonRumley
Posts: 1
Joined: Tue May 02, 2017 1:38 pm

Vault & NuGet Troubles

Post by ClaytonRumley » Tue May 02, 2017 2:24 pm

Hello,

We are using Vault 9.1.0 and Visual Studio 2015 and we've been noticing strange behaviour with NuGet that is often difficult to reproduce but has been very vexing as there are six of us working on the same project.

From other posts on this site we've learned that whenever we're dealing with NuGet we need to check out packages.config and web.config or else the files will become renegade and out of sync with everyone else. However we've noticed an issue with the .dll.refresh files for assemblies added via NuGet.

It appears that when one user changes versions of a NuGet package, NuGet uninstalls the previous version, causing a delete of the .dll.refresh file from Vault, then adds the new version, causing an add of a file of the same name. On other user's computers, that .dll.refresh file will now be listed as renegade and will not update when we perform a "Get Latest". Since the .dll.refresh files are hidden underneath the .dlls, unless you explicitly expand them and look for them, you won't notice a problem. With incorrect .dll.refresh files, you no longer have the right version of the .dll. When we check Vault's history for the .dll.refresh file, it only shows one version which implies that it was deleted from Vault and a new one was added.

Steps to reproduce:
  • User A creates a new project, adds a NuGet package (one with a .dll in it), checks the solution into Vault
  • User B opens the solution and builds, getting all files from NuGet
  • User A then checks out packages.config and web.config, and changes the version of the NuGet package (in our tests we both downgraded and upgraded), then checks everything in
  • User B "Gets Latest" from Vault. The .dll.refresh file is now renegade and pointing to the wrong location.
I believe this problem is also happening with non-dll files (like getting Bootstrap from NuGet and then changing versions...the .js and .css files become renegade).

Is there some way to avoid this problem?

Thank you for your help,

Clayton

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Vault & NuGet Troubles

Post by Beth » Wed May 03, 2017 2:04 pm

Here are some options you can try.

1) A Get with overwrite only the Renegade files with the Vault GUI client should take care of the Renegade as long as relative paths are used inside that file.

2) if a Get would mess up the paths, then the file will never match anyone's file except for the last one to check in. In this case, either the file needs to not be controlled, or else users need to manually merge only what they need and just know there will always be some kind of status on that file.

3) On the Microsoft forums there is another suggestion that might work for you: https://social.msdn.microsoft.com/Forum ... rcecontrol.
Beth Kieler
SourceGear Technical Support

Post Reply