Can't load project after pulling: “Expected 'ENCODING' but found 'utf-8'.”

♀尐吖头ヾ 提交于 2020-01-01 07:34:10

问题


After pulling the project (WPF application) from git,

I get this error:

What could be causing it? It worked fine before pulling it (someone else commited on the project).


回答1:


It appears there were some unclosed tags in my .csproject file.

Strangely though, the error above was reported instead.




回答2:


Look at your .csproj extension file search for: <<<<<< or ====== or >>>>>>>> and remove it.

also check your web.config file for those symbols and remove them too if they exist there.




回答3:


I had the same issue, I was just missing a closing tag.

http://www.w3schools.com/xml/xml_validator.asp < try this

edit - Try to open your .csproj in an editor and look for the missing tags. You can do this via Visual Studio if you unload your project then edit your project.




回答4:


I had some strange underscore lines, I am using the tool Git Extensions, maybe this tool added this lines.. I compared a older version in notepad++ and saw this. It didn´t show in Visual Studio.




回答5:


This forum really helped me. Thank you very much. In my case my team mate merged the code and in .csproj there was end tag missing for we had >. I opened .csproj in visual studio. Edited end tag to /> and saved the file and reloaded the project and it was fine.



来源:https://stackoverflow.com/questions/15990064/cant-load-project-after-pulling-expected-encoding-but-found-utf-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!