How to fix “Root element is missing.” when doing a

2019-01-14 10:10发布

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 this error message inside of "Visual Build Pro" when using using the "Make VS 2008" command. This command works just fine when building other solutions (like about 20) and I am not really sure why mine is getting the error.

Any help would be very much appreciated. :)

I am using VS 2008 and Visual Build Pro 6.7.

26条回答
冷血范
2楼-- · 2019-01-14 10:57

In my case xxxx.pubxml.user was not loaded when tried to publish the application. I deleted the file and restart the Visual studio then created a new profile to publish it, problem is solved and published successfully.

查看更多
爷、活的狠高调
3楼-- · 2019-01-14 10:58

I got same error. showing error Microsoft.Data.Entity could not loaded root element missing. When i delete that file from C:\Windows\Microsoft.NET\Framework\v4.0.30319 and again open my solution my problem was solved. Everything woks fine

查看更多
时光不老,我们不散
4楼-- · 2019-01-14 10:59

This error is caused by corrupted proj file. Visual Studio allway has backup project file at specific folder. Pls browse to: C:\Users\\Documents\Visual Studio \Backup Files\ You can see 2 file same as: Original-May-18-2018-1209PM..csproj Recovered-May-18-2018-1209PM..csproj

You only need copy file: Original-May-18-2018-1209PM..csproj And re-name as .csproj & overide at root project folder. Trouble is solved!

查看更多
等我变得足够好
5楼-- · 2019-01-14 11:00

I had this issue running VS 2017, on build I was getting the error that the 'root element was missing'. What solved it for me was going to Tools > Nuget Package Manager > Package Manager Settings > General > Clear all Nuget Caches. After doing that I ran the build again and it was fixed.

查看更多
▲ chillily
6楼-- · 2019-01-14 11:01

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!

查看更多
Ridiculous、
7楼-- · 2019-01-14 11:02

This was easy to fix than I thought. All I did was clear the website cache folder.

Delete everything from

DRIVE LETTER OF OS:\Users\USER NAME\AppData\Local\Microsoft\WebsiteCache

example

C:\Users\Jack\AppData\Local\Microsoft\WebsiteCache

For more visual studio tips please visit My Blog

查看更多
登录 后发表回答