How to fix \"Root element is missing.\" when doing a Visual Studio (VS) Build?
Any idea what file I should look at in my solution?
Actually, I am getting thi
In my case, .csproj was changed to encoded format. I did undo changes to csproj in Git(Team explorer) and reloaded the project file. This solved the problem.
In my case the RDLC files work with resource files (.resx), I had this error because I hadn't created the correspondent resx file for my rdlc report.
My solution was add the file .resx inside the App_LocalResources in this way:
\rep
\rep\myreport.rdlc
\rep\App_LocalResources\myreport.rdlc.resx
In my case, the file C:\Users\xxx\AppData\Local\PreEmptive Solutions\Dotfuscator Professional Edition\4.0\dfusrprf.xml
was full of NULL.
I deleted it; it was recreated on the first launch of Dotfuscator, and after that, normality was restored.
My project did not load and gave me a Root Element Missing
error. I just deleted ****.csproj.user
file and reloaded it again. The problem was solved this way
Hey, I have the same issue on Mac working on a Cocoa C# solution. (But I solved it !)
It always say that the root element is missing so it cannot load my C# project file.
I have the 2017 Visual Studio Mac Community Edition. I finally managed to find a solution after several hours (painful!).
My solution is because the frameworks related to the Visual Studio are old or broken. I found this because I tried to create a new Mac solution by Cocoa and it said "failed to save the solution". Then, I tried to create an Android Solution and it is working fine. Go to your "Finder" and "Go" -> "Go to a Folder" then go to the "Library/Frameworks". I have deleted mono.framework and frameworks related to Xamarin because I believe these Xamarin frameworks are broken.
Then, uninstalled the Visual Studio and reinstalled it. Now everything works fine!
In my case the problem occurred due to closing my PC while visual studio were remain open, so in result csproj.user file saved empty. Thankfully i have already backup, so i just copied all xml from csproj.user and paste in my affected project csproj.user file ,so it worked perfectly.
This file just contain building device info and some more.