0

VS 2017 (v15.6.6 Enterprise) deletes files/folder on me and my team members consistently. We have lost so many code because of these kind of bugs.

One case is when someone moves the file/folder and another team member modifies it before getting latest. In this case, conflicts window appear as it should but it deletes the local file (unrecoverably) and we end up getting the server version because it doesn't allow us to merge the file since it doesn't exist in local (yes, because it deleted the file).

Another issue is that padlock icons appear in some files and doesn't appear in others (padlocked files change between teammembers. e.g. File A might be padlocked in my local and might not be padlocked in another person or vice versa).

We decided to shelve all of our changes before checkin in now as a solution. Or we will downgrade to VS 2015 if these issues continue. What are our options? We mapped/unmapped the projects several times already.

yakya
  • 4,559
  • 2
  • 29
  • 31

1 Answers1

0

First, if the local files are gone from your file system, they're gone. You can see if you can use a file recovery utility to undelete them, but past that, there's no way to get them back.

The move option in TFS is like "delete old files + add new files". So when you check in original files, actually the files had been deleted before. VS will sync your local workspace with TFS server automatically. That's why your local files got deleted.

It's better to not move files frequently in TFS server folder, this will also mess up the history info. If you insist on this, you could just use the workaround shelve all of our changes before checkin.

For padlocked icons not shown, all that is wrong is that the Project file does not have the correct binding to TFS. There is a section missing in the .csproj file that should look something like this:

<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>

You need to go to File > Source Control > Advanced... > Change Source Control... Select the project, choose unbind and rebind it. More details please take a look at this similar question: No padlock icon for some projects in a source controlled solution

These kind of issues should not related to your local Visual Studio version.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Actually, we use "Move" option from source control explorer to not lose the tfs history. For padlocked icons, that code part exist in all of the projects and we unbinded/rebinded several times already.. – yakya May 02 '18 at 08:45
  • And those padlock icons change from user to user (File A might be padlocked in my local and might not be padlocked in another person or vice versa) which means that it isn't related to the tfs side but VS related.. – yakya May 02 '18 at 08:47
  • @sotn If so, this kind of issue usually related to cache. Suggest you try to clear VS and TFS cache. How to please refer this [blog](https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not/) & this [one](https://blogs.msdn.microsoft.com/vsalm/2013/12/17/how-to-clear-the-tfs-cache-on-client-machines/) – PatrickLu-MSFT May 02 '18 at 08:56
  • @sotn Another way is remove/unbind those particular files/folders in TFS source control and then rebind them. How to please refer: https://stackoverflow.com/questions/358951/how-can-i-completely-remove-tfs-bindings Also deleted the old workspace(back up local changes first), create a new workspace and get latest from TFS server. Which should do the trick of the issue. – PatrickLu-MSFT May 02 '18 at 15:09