Question

When I open Visual Studio 2012, I am greeted with the message "Visual Studio The encoding in the declaration 'utf-16' does not match the encoding of the document 'utf-8'".

Visual Studio Error Dialog

Does anyone know why this might be happening? Or what troubleshooting I should do?

Was it helpful?

Solution

It turns out that the root cause was an issue connecting to the TFS server, but I had to clear out my Team Explorer cache as well.

To clear out your Team Explorer cache, delete the following folders

  • C:\Users\[USER]\AppData\Local\Microsoft\Team Foundation\2.0\Cache
  • C:\Users\[USER]\AppData\Local\Microsoft\Team Foundation\3.0\Cache

OTHER TIPS

There may be another reason because of TFS server unable to connect to the database. Open TFS Administration console and select your collection in "Team project collections". Find SQL server instance in "General" tab. Check whether this instance can connect from TFS server. In my case it worked after restarting the db server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top