Root element is missing как исправить

Fixes an issue in which you receive an error message when you run an application in Microsoft Customer Care Framework 2009. Specifically, the issue occurs when do not configure any non-hosted applications.

Microsoft Customer Care Framework 2009 Microsoft Customer Care Framework 2009 Service Pack 1 More…Less

Symptoms

Consider the following scenario:

  • You run an application that uses the Microsoft Customer Care Framework 2009 Service Pack 1 (SP1) quick fix engineering (QFE) client.

  • You do not configure any non-hosted applications.

  • You start the Customer Care Framework client.

In this scenario, you receive an error message that resembles the following:

root element is missing.

Cause

This issue occurs because the Customer Care Framework client does not check whether the list of non-hosted applications is null when the client retrieves the list. When you start the client, the startNonHostedApplicationsClient_GetNonHostedApplicationsCompleted method in the Microsoft.Ccf.Desktop.UI.Core assembly starts. The method is used to check the list of non-hosted applications. However, the method does not check whether the list is null. This causes the error that is described in the “Symptoms” section.

Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=supportNote In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have CCF 2009 SP1 Quick Fix Engineering (QFE) installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply the hotfix if the affected files are not being used.

Hotfix replacement information


This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

File name

File version

File size

Date

Time

Platform

Microsoft.Ccf.Desktop.Ui.Core.dll

Not applicable

Not applicable

Not applicable

Not applicable

Not applicable

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Need more help?

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.

Community's user avatar

asked Sep 22, 2010 at 18:29

Gerhard Weiss's user avatar

Gerhard WeissGerhard Weiss

9,17318 gold badges63 silver badges67 bronze badges

1

In my case it was the xxxxxxxxxxxx.vcxproj.user file that was causing the problem; it was blank after a crash. I renamed it and the problem went away.

answered May 18, 2015 at 20:57

Elliot's user avatar

2

Make sure any XML file (or any file that would be interpreted as an XML file by visual studio) has a correct XML structure — that is, one root element (with any name, I have use rootElement in my example):

<?xml version="1.0"?> 
<rootElement>
 ...
</rootElement>

answered Sep 22, 2010 at 18:36

Oded's user avatar

OdedOded

485k98 gold badges877 silver badges1003 bronze badges

3

You will also get ‘root element is missing’ when the BOM strikes :). BOM = byte order mark. This is an extra character that gets added to the start of a file when it is saved with the wrong encoding.
This can happen sometimes in Visual Studio when working with XML files. You can either code something to remove it from all your files, or if you know which file it is you can force visual studio to save it with a specific encoding (utf-8 or ascii IIRC).

If you open the file in an editor other than VS (try notepad++), you will see two funny characters before the <? xml declaration.

To fix this in VS, open the file in VS and then depending on the version of VS

  • File > Advanced Save Options > choose an appropriate encoding
  • File > Save As > keep the filename, click the drop-down arrow on the right side of the save button to select an encoding

answered Sep 22, 2010 at 19:07

stombeur's user avatar

stombeurstombeur

2,72222 silver badges45 bronze badges

0

In my case.I was getting missing element error pointing to NuGet.Config file.
At that time it was looking some thing like this

<?xml version="1.0" encoding="utf-8"?>
<settings>
  <repositoryPath>Packages</repositoryPath>
</settings>

then I just added configuration tag that actually wraps entire xml. Now working fine for me

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <settings>
     <repositoryPath>Packages</repositoryPath>
  </settings>
</configuration>

answered Jun 24, 2016 at 18:21

Malik Khalil's user avatar

Malik KhalilMalik Khalil

6,1822 gold badges38 silver badges32 bronze badges

1

This error is caused by corrupted proj file.

Visual Studio always has backup project file at specific folder.

Please browse to:

C:Users<Your user>DocumentsVisual Studio <Vs version>Backup Files<your project>

You should see 2 files like this:

Original-May-18-2018-1209PM.<your project>.csproj
Recovered-May-18-2018-1209PM.<your project>.csproj

You only need copy file:

Original-May-18-2018-1209PM.<your project>.csproj

And re-name as

<your project>.csproj 

and override at root project folder.

Problem is solved!

marc_s's user avatar

marc_s

722k173 gold badges1320 silver badges1443 bronze badges

answered May 18, 2018 at 10:43

user3037124's user avatar

2

My project did not load and gave me a Root Element Missingerror. I just deleted ****.csproj.user file and reloaded it again. The problem was solved this way

answered Sep 27, 2020 at 10:31

Fereshteh Mirjalili's user avatar

In my case, when I opened the .csproj file, it was empty so I went to my previous commit in git and copied the contents of that file and pasted it my current .csproj file. After which I deleted the .csproj.user file, reloaded my project, and everything started working again.

answered Mar 2, 2017 at 21:50

Alf Moh's user avatar

Alf MohAlf Moh

7,0595 gold badges39 silver badges49 bronze badges

You can also search for the file. Navigate to your project directory with PowerShell and run Get-FileMissingRoot:

function Get-FileMissingRoot {

    dir -recurse |
        where {
            ($_ -is [IO.FileInfo]) -and 
            (@(".xml", ".config") -contains $_.extension) 
        } |
        foreach {
            $xml = New-Object Xml.XmlDocument;
            $filename = $_.FullName
            try {
                $xml.Load($filename)
            }
            catch {
                write ("File: " + $filename)
                write ($_.Exception.Message)
            }
        }
}

answered Aug 6, 2015 at 19:06

Sam Porch's user avatar

Sam PorchSam Porch

7515 silver badges11 bronze badges

0

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.

answered Nov 26, 2018 at 15:51

Shawn Hill's user avatar

Shawn HillShawn Hill

512 silver badges2 bronze badges

2

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

answered Jan 22, 2015 at 9:55

0

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.

answered Aug 12, 2019 at 18:03

Archana R's user avatar

In my case, the file C:UsersxxxAppDataLocalPreEmptive SolutionsDotfuscator Professional Edition4.0dfusrprf.xml was full of NULL.

I deleted it; it was recreated on the first launch of Dotfuscator, and after that, normality was restored.

answered Nov 27, 2014 at 11:20

pascal's user avatar

pascalpascal

3,2571 gold badge17 silver badges35 bronze badges

1

This error can sometimes occur when you edit some Project Toolchain settings Atmel Studio 6.1.2730 SP2.

In my case I tried to edit Project Properties > Toolchain > Linker > General settings with ‘All Configurations’ selected in the Configuration. When I checked or unchecked a setting, a dialog with the error popped up. However, I found that I could make the same edits if I made them to only one build configuration at a time; i.e. with only ‘Debug’ or ‘Release’ selected instead of ‘All Configurations’.

Interestingly, I later was able to edit the same Linker settings even with ‘All Configurations’ selected. I don’t know what changed in my project that made this possible.

answered Dec 25, 2013 at 11:52

ptschnack's user avatar

ptschnackptschnack

1712 silver badges5 bronze badges

1

I had Blue Screen while running Visual Studio 2013, when I Restart I intended to run again my project, but I had always this headius Error.
anyway

Deleting The Folders with the Temp info Fix this problem.
in my case the Project was a Windows Server, and Basically it Creates a Folder with some Tem info.

the folder was

C:UsersUser_NAMEAppDataLocalNAme_OF_THeProject

inside Exist a Folder with the Name of the Project+ some Generated GUI
Service.ServerHostLoader_Url_u2jn0xkgjf1th0a3i2v03ft15vj4x52i

this is the Folder I deleted and now I can run again the Project.

Robert's user avatar

Robert

5,26743 gold badges65 silver badges115 bronze badges

answered Mar 2, 2015 at 15:35

emamones's user avatar

In my case I upgraded to VS2017 and wanted to build all projects with MSBuild 4 with my build script (which had been using MSBuild 3.5 when we were using VS2015). That MSBuild upgrade appeared fine for the Windows desktop applications but the ones for Windows CE with compact framework would give me this confusing error. Reverting to MSBuild 3.5 for Windows CE projects fixed the issue for me.

I did have the BOM in .csproj files by the way and removed them for all projects in a solution that would not build but that did not help.

answered Feb 23, 2018 at 22:00

Martin Maat's user avatar

Martin MaatMartin Maat

6944 silver badges23 bronze badges

In xamarin form project. I deleted

.VS Project folder.
ProjectName.Android.csProj.User
ProjectName.Android.csProj.bak

answered Jan 12, 2019 at 8:23

A.Goutam's user avatar

A.GoutamA.Goutam

3,3228 gold badges40 silver badges87 bronze badges

In my case I received a message like this:
See this picture

I just commented the snipped code below in the project file (.csproj) and the problem was fixed.

<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />

Tunaki's user avatar

Tunaki

130k46 gold badges326 silver badges414 bronze badges

answered Mar 2, 2017 at 18:03

Eduardo Sobrinho's user avatar

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.

answered Jun 17, 2017 at 6:10

Muhammad Masud's user avatar

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!

answered Aug 7, 2017 at 21:14

Can Gao's user avatar

In my case, I just renamed the .csproj.user and restart the visual studio and opened the project. It automatically created another .csproj.user file and the solution worked fine for me.

answered Jul 25, 2019 at 6:22

MBA's user avatar

MBAMBA

351 silver badge6 bronze badges

Ho i simply solved this issue by going to source control explorer and selected the issue project, right clicked and selected the option Get Specific Version under Advanced menu. And then selected Type as Latest Version and ticked following two check boxes and clicked Get button. Then i refreshed the solution and my project came back to live and problem gone. Please note that This may overwrite your local projects so your current changes may lose. So if you dont have any issues with your local copy then you can try this. Hope it helps

answered Jul 31, 2015 at 11:32

Nithin Paul's user avatar

Nithin PaulNithin Paul

2,0892 gold badges30 silver badges54 bronze badges

I got this issue on a Web API project. Finally figured out that it was in my «///» method comments. I have these comments set to auto-generate documentation for the API methods. Something in my comments made it go crazy. I deleted all the carriage returns, special characters, etc. Not really sure which thing it didn’t like, but it worked.

answered Aug 10, 2016 at 17:24

Jarrette's user avatar

JarretteJarrette

1,0752 gold badges16 silver badges40 bronze badges

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
repmyreport.rdlc
repApp_LocalResourcesmyreport.rdlc.resx

answered Feb 7, 2017 at 21:15

Wilson's user avatar

WilsonWilson

50010 silver badges8 bronze badges

I had a few massive VS2015 Community crashes.

Delete all the .csproj.user files

which were full of null characters, and also these

C:UsersUserNameAppDataLocalTemp

.NETFramework,Version=v4.0.AssemblyAttributes.cs
.NETFramework,Version=v4.5.AssemblyAttributes.cs
.NETFramework,Version=v4.5.2.AssemblyAttributes.cs

answered Feb 9, 2017 at 13:03

CRice's user avatar

CRiceCRice

12.1k7 gold badges57 silver badges83 bronze badges

In my case, I got this error because of an empty packages.config file.
This caused the NUGET package manager to fail and show the error Root element is missing.
The resolution was to copy over elements from another non-empty file and then change it according to the needs.

Example (packages.config):

<?xml version="1.0" encoding="utf-8"?>
<packages>
 <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net451"/>
 <package id="Newtonsoft.Json" version="5.0.4" targetFramework="net451"/>
</packages>

answered Mar 1, 2018 at 14:38

Matt's user avatar

MattMatt

24.6k17 gold badges117 silver badges179 bronze badges

In my case, i was using vs 2010 with crystal report. Innerexception revealed root element is missing error. Go to directory like C:UserssamAppDataLocaldssmsdssms.vshost.exe_Url_uy5is55gioxym5avqidulehrfjbdsn131.0.0.0 which is given in the innermessage and make sure user.config is proper XML (mine was blank for some reason).

answered Mar 29, 2018 at 10:40

Nie Selam's user avatar

Nie SelamNie Selam

1,2792 gold badges22 silver badges52 bronze badges

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.

answered Jan 15, 2019 at 6:35

Mir's user avatar

MirMir

3831 gold badge5 silver badges16 bronze badges

No one of these solutions fixed my problem.

In my case, I finished my work and I shut down my computer. The day after I wasn’t able to compile my project. I tried some of these solutions and I realized all my projects weren’t work.

To Fix it, I reinstall .net core Framework.

Visual Studio 2017

answered Jul 17, 2019 at 0:18

AFetter's user avatar

AFetterAFetter

3,1566 gold badges37 silver badges60 bronze badges

Как исправить «Элемент Root отсутствует». при выполнении сборки Visual Studio (VS)?

Любая идея, какой файл я должен посмотреть в своем решении?

Собственно, я получаю это сообщение об ошибке внутри «Visual Build Pro» при использовании команды «Сделать VS 2008». Эта команда отлично работает при построении других решений (например, около 20), и я не совсем уверен, почему моя ошибка.

Любая помощь будет очень оценена.:)

Я использую VS 2008 и Visual Build Pro 6.7.

4b9b3361

Ответ 1

Убедитесь, что любой файл XML (или любой файл, который будет интерпретироваться как XML файл визуальной студией) имеет правильную структуру XML, то есть один корневой элемент (с любым именем, я использую rootElement в моем примере ):

<?xml version="1.0"?> 
<rootElement>
 ...
</rootElement>

Ответ 2

В моем случае это был файл xxxxxxxxxxxx.vcxproj.user, который вызывал проблему (она была пустой) после сбоя. Я переименовал его, и проблема исчезла.

Ответ 3

Вы также получите «root-элемент отсутствует», когда BOM поражает:). BOM = знак порядка байтов. Это дополнительный символ, который добавляется к началу файла, когда он сохраняется с неправильной кодировкой.
Иногда это может происходить в Visual Studio при работе с файлами XML. Вы можете либо закодировать что-нибудь, чтобы удалить его из всех ваших файлов, либо если вы знаете, какой файл вы можете заставить визуальную студию сохранить его с помощью определенной кодировки (utf-8 или ascii IIRC).

Если вы откроете файл в редакторе, отличном от VS (попробуйте notepad ++), вы увидите два забавных символа перед <? xml.

Чтобы исправить это в VS, откройте файл в VS, а затем в зависимости от версии VS

  • Файл > Дополнительные параметры сохранения > выберите подходящую кодировку
  • Файл > Сохранить как > сохранить имя файла, щелкните стрелку раскрывающегося списка в правой части кнопки сохранения, чтобы выбрать кодировку

Ответ 4

В моем случае. Я получал отсутствующую ошибку элемента, указывающую на файл NuGet.Config.
В то время он смотрел что-то вроде этого

<?xml version="1.0" encoding="utf-8"?>
<settings>
  <repositoryPath>Packages</repositoryPath>
</settings>

то я просто добавил тег configuration, который фактически обертывает весь xml. Теперь работаю отлично для меня

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <settings>
     <repositoryPath>Packages</repositoryPath>
  </settings>
</configuration>

Ответ 5

Эта ошибка вызвана повреждением файла Proj.

Visual Studio всегда имеет резервный файл проекта в определенной папке.

Пожалуйста, перейдите к:

C:Users<Your user>DocumentsVisual Studio <Vs version>Backup Files<your project>

Вы должны увидеть 2 файла:

Original-May-18-2018-1209PM.<your project>.csproj
Recovered-May-18-2018-1209PM.<your project>.csproj

Вам нужно только скопировать файл:

Original-May-18-2018-1209PM.<your project>.csproj

И переименуйте как

<your project>.csproj 

и переопределить в корневой папке проекта.

Проблема решена!

Ответ 6

У меня такая же ошибка. показывая ошибку Microsoft.Data.Entity не удалось загрузить корневой элемент. Когда я удаляю этот файл из C:WindowsMicrosoft.NETFrameworkv4.0.30319 и снова открываю свое решение, моя проблема была решена. Все woks fine

Ответ 7

В моем случае, когда я открыл файл .csproj, он был пустым, поэтому я перешел к предыдущей фиксации в git и скопировал содержимое этого файла и вставил его в текущий текущий файл .csproj. После чего я удалил файл .csproj.user, перезагрузил мой проект, и все снова заработало.

Ответ 8

В моем случае файл C:UsersxxxAppDataLocalPreEmptive SolutionsDotfuscator Professional Edition4.0dfusrprf.xml был заполнен NULL.

Я удалил его; он был воссоздан при первом запуске Dotfuscator, после чего нормальность была восстановлена.

Ответ 9

Вы также можете выполнить поиск файла. Перейдите в каталог проекта с помощью PowerShell и запустите Get-FileMissingRoot:

function Get-FileMissingRoot {

    dir -recurse |
        where {
            ($_ -is [IO.FileInfo]) -and 
            (@(".xml", ".config") -contains $_.extension) 
        } |
        foreach {
            $xml = New-Object Xml.XmlDocument;
            $filename = $_.FullName
            try {
                $xml.Load($filename)
            }
            catch {
                write ("File: " + $filename)
                write ($_.Exception.Message)
            }
        }
}

Ответ 10

Эта ошибка может возникать при редактировании некоторых параметров Toolchain Project Atmel Studio 6.1.2730 SP2.

В моем случае я попытался изменить «Свойства проекта» > «Инструментарий» > «Коннектор» > «Общие настройки» с «Все конфигурации», выбранные в конфигурации. Когда я проверил или снял флажок, появится диалог с ошибкой. Тем не менее, я обнаружил, что могу сделать те же изменения, если я сделал их только с одной конфигурацией сборки за раз; т.е. вместо «Все конфигурации» выбраны только «Отладка» или «Выпуск».

Интересно, что позже я смог отредактировать те же настройки компоновщика, даже если выбрано «All Configurations». Я не знаю, что изменилось в моем проекте, что сделало это возможным.

Ответ 11

У меня был Blue Screen во время работы Visual Studio 2013, когда я перезапустил, я намеревался снова запустить свой проект, но у меня всегда была эта ошибка Headius.
в любом случае

Удаление папок с информацией о Temp. Устраните эту проблему.
в моем случае проект был Windows Server, и в основном он создает папку с некоторой информацией о Tem.

папка была

C:UsersUser_NAMEAppDataLocalNAme_OF_THeProject

внутри Exist a Folder с именем проекта + некоторый сгенерированный графический интерфейс
Service.ServerHostLoader_Url_u2jn0xkgjf1th0a3i2v03ft15vj4x52i

это папка, которую я удалил, и теперь я могу снова запустить проект.

Ответ 12

В моем случае я обновился до VS2017 и хотел собрать все проекты с MSBuild 4 с помощью моего скрипта сборки (который использовал MSBuild 3.5, когда мы использовали VS2015). То, что обновление MSBuild выглядело хорошо для настольных приложений Windows, но для Windows CE с компактным фреймворком дало бы мне эту запутанную ошибку. Возврат к MSBuild 3.5 для проектов Windows CE исправил проблему для меня.

Кстати, у меня была спецификация в файлах .csproj, и я удалил их для всех проектов в решении, которое не будет создано, но это не поможет.

Ответ 13

В моем случае я получил такое сообщение:
Посмотрите это изображение

Я просто прокомментировал сокращенный код ниже в файле проекта (.csproj), и проблема была исправлена.

<Import Project="$(MSBuildBinPath)Microsoft.CSharp.targets" />

Ответ 14

В моем случае xxxx.pubxml.user не был загружен при попытке опубликовать приложение. Я удалил файл и перезапустил Visual Studio, а затем создал новый профиль для публикации, проблема решена и успешно опубликована.

Ответ 15

Эй, у меня такая же проблема на Mac, работающая над решением Cocoa С#.
(Но я решил это!)

Он всегда говорит, что отсутствует корневой элемент, поэтому он не может загрузить файл проекта С#.

У меня есть версия Visual Studio Mac OS 2017.
Наконец-то мне удалось найти решение через несколько часов (болезненно!).

Мое решение связано с тем, что фреймворки, связанные с Visual Studio, являются старыми или сломанными.
Я нашел это, потому что я попытался создать новое решение для Mac с помощью Cocoa, и он сказал, что «не удалось сохранить решение». Затем я попытался создать решение для Android, и он работает нормально.
Перейдите в «Finder» и «Go» → «Go to a Folder», затем перейдите в «Library/Frameworks». Я удалил mono.framework и рамки, связанные с Xamarin, потому что я считаю, что эти рамки Xamarin нарушены.

Затем удалите Visual Studio и переустановите его.
Теперь все работает нормально!

Ответ 16

У меня была эта проблема при запуске VS 2017, при сборке я получал сообщение об ошибке «отсутствует корневой элемент». Для меня это решило в разделе Инструменты> Диспетчер пакетов Nuget> Настройки диспетчера пакетов> Общие> Очистить все кэши Nuget. После этого я снова запустил сборку, и она была исправлена.

Ответ 17

В форме проекта xamarin. я удалил

.VS Project folder.
ProjectName.Android.csProj.User
ProjectName.Android.csProj.bak

Ответ 18

Хо, я просто решил эту проблему, перейдя в проводник управления версиями и выбрал проект проблемы, щелкнул правой кнопкой мыши и выбрал опцию Get Specific Version в меню Advanced. А затем выберите «Тип как последняя версия» и отметьте следующие два флажка и нажмите кнопку «Получить». Затем я обновил решение, и мой проект вернулся к жизни и проблема исчезла. Обратите внимание, что это может перезаписать ваши локальные проекты, чтобы ваши текущие изменения могли потеряться. Поэтому, если у вас нет проблем с вашей локальной копией, вы можете попробовать это. Надеюсь, что это поможет.

Ответ 19

Это было легко исправить, чем я думал. Все, что я сделал, — это очистить папку кэша веб-сайта.

Удалить все из

ПИСЬМО ПРИВОДА ОС:ПользователиИМЯ ПОЛЬЗОВАТЕЛЯ AppDataLocalMicrosoftWebsiteCache

Пример

C:UsersJackAppDataLocalMicrosoftWebsiteCache

Для получения дополнительных советов по визуальной визуализации посетите Мой блог

Ответ 20

Я получил эту проблему в проекте веб-API. Наконец выяснилось, что это было в комментариях метода «///». У меня есть эти комментарии для автоматической генерации документации для методов API. Что-то в моих комментариях сошло с ума. Я удалил все возвраты каретки, специальные символы и т.д. Не совсем уверен, какая вещь ему не понравилась, но она сработала.

Ответ 21

В моем случае файлы RDLC работают с файлами ресурсов (.resx), у меня была эта ошибка, потому что я не создал соответствующий файл resx для моего отчета rdlc.

Мое решение было добавить файл .resx внутри App_LocalResources таким образом:

rep
repmyreport.rdlc
repApp_LocalResourcesmyreport.rdlc.resx

Ответ 22

У меня было несколько массивных сбоев сообщества VS2015.

Удалите все файлы .csproj.user

которые были заполнены нулевыми символами, а также эти

C:Usersимя_пользователяAppDataLocalTemp

.NETFramework, Version = v4.0.AssemblyAttributes.cs.NETFramework, Version = v4.5.AssemblyAttributes.cs.NETFramework, Version = v4.5.2.AssemblyAttributes.cs

Ответ 23

В моем случае я получил эту ошибку из-за пустого файла packages.config. Это привело к сбою диспетчера пакетов NUGET и отображению ошибки Корневой элемент отсутствует. Решением было скопировать элементы из другого непустого файла, а затем изменить его в соответствии с потребностями.

Пример (packages.config):

<?xml version="1.0" encoding="utf-8"?>
<packages>
 <package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net451"/>
 <package id="Newtonsoft.Json" version="5.0.4" targetFramework="net451"/>
</packages>

Ответ 24

В моем случае я использовал против 2010 с Crystal Report. Не исключение выявило, что в корневом элементе отсутствует ошибка. Перейдите в каталог, например, C:UserssamAppDataLocaldssmsdssms.vshost.exe_Url_uy5is55gioxym5avqidulehrfjbdsn131.0.0.0, который указан во внутреннем сообщении, и убедитесь, что user.config — это правильный XML (мой файл по какой-то причине пуст).

Ответ 25

Удаление файла .user именно то, что решило проблему для меня. Удар молнии возле офиса выключил мой компьютер и повредил мой файл .user, и проект не загрузился. Я открыл файл в Notepad++, и «пробелы» оказались [NULL] символами. Удалил файл .user и файл загружен!

источник https://forums.asp.net/t/1491251.aspx?Can+t+load+project+because+root+element+is+missing+

Ответ 26

У меня была такая же проблема в проекте Xamarin Forms. iOS-проект был недоступен, и я не смог перезагрузить его. Я искал решение, которое не нужно ничего удалять.

Ответ, который я получил из этого блога: https://dev.to/codeprototype/xamarin-form-application-failed-to-load-android-project-root-element-missing—27o0

Поэтому, не удаляя ничего, вы можете удалить файл .csproj.user (или переименовать его), чтобы Visual Studio снова его создал. Работал на меня дважды.

Ответ 27

В моем случае проблема возникла из-за закрытия моего ПК, в то время как Visual Studio оставалась открытой, поэтому в результате файл csproj.user сохранился пустым. К счастью, у меня уже есть резервная копия, поэтому я просто скопировал весь xml из csproj.user и вставил в мой файл csproj.user затронутого проекта, чтобы он работал отлично.

Этот файл просто содержит информацию об устройстве устройства и многое другое.

Ответ 28

Ни одно из этих решений не решило мою проблему.

В моем случае я закончил свою работу и выключил компьютер. На следующий день я не смог собрать свой проект. Я попробовал некоторые из этих решений и понял, что все мои проекты не работают.

Чтобы это исправить, я переустанавливаю .net core Framework.

Visual Studio 2017

Ответ 29

В моем случае я просто переименовал .csproj.user, перезапустил Visual Studio и открыл проект. Он автоматически создал еще один файл .csproj.user, и решение отлично сработало для меня.

Ответ 30

В моем случае Microsoft.Common.CurrentVersion.targets был поврежден. Я скопировал этот файл из другой системы, и он работал.

  • Remove From My Forums
  • Question

  • I’m reading the XML from file system and loading into XDocument using MemoryStream. But i’m getting root element is missing error.
    Here is code

    <?xml version="1.0" encoding="utf-8"?>
    <Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <FormInfo>
      <Id>Id1</Id>
     </FormInfo>
    </Root>
    
    private byte[] GetFile()
    {
    	  byte[] buffer = null;
          using (FileStream fs = new FileStream(@"C:MappersTest.xml", FileMode.Open))
          {
            fs.Position = 0;
            buffer = new byte[fs.Length];
            fs.Read(buffer,0,(int)fs.Length);
          }
    }
    
    
    private void DoWork()
    {
    	byte[] xml = GetFile();
          
          
          using (MemoryStream xmlDataStream = new MemoryStream())
          {
            xmlDataStream.Write(xml, 0, xml.Length);
    
    		//Its failing Here with error...."Root element is missing"
            XDocument xDoc = XDocument.Load(xmlDataStream);
    
            // Add processing instructions      
            xDoc.AddFirst(GetXslStyleSheetProcessingInstruction());
    
            // Save the stream
            xDoc.Save(xmlDataStream);
    
            // Reset the stream to begining
            xmlDataStream.Position = 0;
    
          }
    }
    

Answers

  • After doing

      xmlDataStream.Write(xml, 0, xml.Length);

    you need to set

      xmlDataStream.Position = 0;

    so that the Load call that follows reads from the beginning of your stream.


    MVP Data Platform Development
    My blog

    • Proposed as answer by

      Friday, July 8, 2011 2:15 AM

    • Marked as answer by
      Gavin Ying — MSFTModerator
      Friday, July 8, 2011 5:15 AM

JMB_74

Novice
Posts: 6
Liked: 1 time
Joined: Jan 12, 2012 1:56 pm
Contact:

Error: root element is missing

Hi,

PC under Windows 7 Pro x64, VeeamEndPoint V1.1.2.119.
Since 2 days now, the backup doesn’t work anymore, I receive mail notification «error: root element is missing».
The backup is stored on a NAS defined as backup repository in our Veeam BR server.
All others some PC’s where VeeamEndPoint is installed on, the backup work fine.

Thank’s.
Regards.
Fred.


PTide

Product Manager
Posts: 6252
Liked: 687 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Root element is missing

Post

by PTide » Nov 23, 2015 10:48 am

Hi,

Do all other machine use the same VBR NAS repository for their jobs?

Thank you.


JMB_74

Novice
Posts: 6
Liked: 1 time
Joined: Jan 12, 2012 1:56 pm
Contact:


PTide

Product Manager
Posts: 6252
Liked: 687 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Root element is missing

Post

by PTide » Nov 23, 2015 11:09 am

Then I suggest you to open a case with support team so they can take a closer look at your environment — it seems to be a VBR related issue so your topic has been merged. Don’t forget to post your case ID here.

Thank you.



JMB_74

Novice
Posts: 6
Liked: 1 time
Joined: Jan 12, 2012 1:56 pm
Contact:

[RESOLVED]Re: Root element is missing

Post

by JMB_74 » Nov 24, 2015 1:03 pm
1 person likes this post

Hi,

After deleting the backup from disk (from the Veeam BR console), the backup task works well.
Fred.

Here it is the support answer:

1. From the Veeam Backup & Replication console, locate the backup files from the Backup & Replication view > disk. Then right click the EP restore points and click remove from disk.
2. Point the Endpoint backup job to a new location or a new repository. This will create a new chain on this new repo.
3. Clear out the Veeam Endpoint Backup database from which the job will need to be reconfigured and the backups will create a new chain and new vbm file. This can be done by the following:

1. Open up RegEdit
2. Look for HKEY_LOCAL_MACHINESOFTWAREVeeamVeeam Endpoint
3. Create new DWORD value called ReCreateDatabase and assign to it 1 (decimal)
4. Start Endpoint service manually or just reboot your pc.
5. If Endpoint started successfully, delete created key.


zadrian

Expert
Posts: 129
Liked: 4 times
Joined: Jul 14, 2015 8:26 am
Contact:

[MERGED] Error: Root element is missing

Post

by zadrian » Mar 04, 2019 2:40 am

I am using VAW 2.2.0.589 Free Edition

I have been getting «Error: Root element is missing» for the past 2 days (over weekend) and also when I try to manually run backup.

Please advise how to resolve for the current user.
Kindly advise what causes these errors (I have approx 500 users and would like to prevent these errors)


wishr

Expert
Posts: 3077
Liked: 452 times
Joined: Aug 07, 2018 3:11 pm
Full Name: Fedor Maslov
Contact:

Re: Error: root element is missing

Post

by wishr » Mar 04, 2019 10:58 am

Hi Zadrian,

I’ve moved your post to an existing thread covering a similar issue. Please take a quick look and reach out to our support team for assistance with resolution.

Thanks


EcoboostPerformance

Influencer
Posts: 24
Liked: 1 time
Joined: May 05, 2020 5:50 pm
Full Name: Ryan
Contact:

Re: Error: root element is missing

Post

by EcoboostPerformance » Jan 03, 2023 8:47 pm

This is the sort of error i would like to see self-heal, I had this same behavior happen after a repo got full and we had to add some space. After the repo gets full even when new space is available, you are presented with the ‘root element is missing error’ on all of your backup jobs using this repo…., I also would like to see a better solution than delete all your backups and set a reg key….

Case #05804075


Who is online

Users browsing this forum: No registered users and 10 guests

Понравилась статья? Поделить с друзьями:
  • Root certificate installation mechanism for sputnik browser как исправить
  • Rodbc error state im002 code 0
  • Root access is not properly installed on this device как исправить
  • Rockstar social club ошибка код 1 не запускается
  • Roominfo 1 ошибка сети