1
votes

When I was trying to debug a Xamarin Forms application on my Android phone, my laptop shut down twice. Now whenever I launch Visual Studio, the Android project will not load. VS solution explorer showing failed Android project load

I tried cleaning and reloading the project, but that doesn't work. Restarting Visual Studio doesn't work either.

When I tried reloading the Android project, I got the error "The project file could not be loaded. Root element is missing."

1
Have you tried searching the error message on DuckDuckGo? A simple search produces another SO question and several other results for this error message. - user1725145
@S List I don't find anything neither from Google nor from DuckDuckGo. - 20B2
What about this SO question? stackoverflow.com/questions/11171322/… - user1725145
If you use some kind of source control, just discard changes to project file. - Taier

1 Answers

2
votes

I had the same problem. The solution I found was deleting the .Droid.csproj.user file which was corrupted.

https://dev.to/codeprototype/xamarin-form-application-failed-to-load-android-project-root-element-missing--27o0