Visual Studio opening .xml files in Notepad

Had the same problem. Try opening the file with XML Editor with Encoding. That way I could explicitly choose Unicode, which successfully opened the file in VS. After saving the file from there the problems went away.


Yes. Visual Studio Text Editor appears not to be able to support UTF-16 Unicode and so opens it up in an external editor. Resave the xml file with "UTF-8" encoding (remember to change your xml declaration from "UTF-16" to "UTF-8" too and then it should be fine.


If you go into Tools > Options > Text Editor > File Extension, do you have anything in here that is mapped to notepad? If so remove that and it should clear it up. Also, if you have an XML file in a project, you can right click on it, choose Open With and choose your default editor there.

Update: see comments for other things to try