Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Error - Unexpected End of File

When I open Visual Studio and attempt to connect to TFS, I get the following error message:

Error

Unexpected end of file.

error - unexpected end of file

I've found a handful of places online (like here and here) where people have run into similar situations but clearing the Team Foundation cache as recommended doesn't solve the issue.

I even completely uninstalled Visual Studio Enterprise 2015 and installed Visual Studio Enterprise 2017 and still get the same error.

I recently created a new TFS instance on another server for testing out some automated build features without messing with our current setup and can connect to the new TFS instance just fine.

What would cause this error?

like image 869
TheIronCheek Avatar asked Mar 08 '23 05:03

TheIronCheek


1 Answers

First you could use another machine with VS installed to connect the same TFS under your account. This will narrow down if the issue only occurs on your local machine or not.

You could try to clear both TFS and VS cache issue.(You may not uninstalled the previous VS clearly).

For TFS cache:

  • close all instances of Visual Studio on the client machine,
  • manually delete the corresponding Tfs client cache folder, and then
  • start Visual Studio

    The corresponding Tfs folders to manually delete are as follows:

       Tfs 2017: "%localappdata%\Microsoft\Team Foundation\7.0\Cache\"
    
       Tfs 2015: "%localappdata%\Microsoft\Team Foundation\6.0\Cache\"
    

For VS cache:

Delete the contents from the following folders

C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VisualStudio
C:\Users\<<Your Alias>>\AppData\Local\Microsoft\VSCommon

Moreover, also give a try with removing the tfs related credentials from Credential Manager, close all Visual Studio instances, deleting %LOCALAPPDATA%\.IdentityService, use another user account connect to the TFS server.


Update: Op ended up doing an OS reload and haven't had any issues since.

like image 137
PatrickLu-MSFT Avatar answered Mar 16 '23 21:03

PatrickLu-MSFT