This project has moved and is read-only. For the latest updates, please go here.

System.Xml.XmlException: '', hexadecimal value 0x1E

Oct 22, 2013 at 7:21 PM
Hi,

first of all, sorry I don't seem to be able to add an issue entry, therefore I have to post here.

I was trying to open resx resourcemanager in an existing project and got the following error:

Error: System.Xml.XmlException: '', hexadecimal value 0x1E, is an invalid character. Line 121, position 40.

The resx manager loads without any content.

I can open all my resx correctly using the normal editor.

I know I use tabs and line end character from time to time in my resources, I am not sure if this is what is causing the error.

Here is the complete stack:

ResX Resource Manager loaded.
Home: http://resxresourcemanager.codeplex.com/
Report issues: http://resxresourcemanager.codeplex.com/workitem/list/basic
Support the project by adding a short review: http://visualstudiogallery.msdn.microsoft.com/3b64e04c-e8de-4b97-8358-06c73a97cc68
Assembly location: C:\Users\eric\AppData\Local\Microsoft\VisualStudio\11.0\Extensions\fpvw0e45.kny
Resolve assembly DataGridExtensions, Version=1.0.11.0, Culture=neutral, PublicKeyToken=43de855f87de903a => C:\Users\eric\AppData\Local\Microsoft\VisualStudio\11.0\Extensions\fpvw0e45.kny\DataGridExtensions.dll
Error: System.Xml.XmlException: '', hexadecimal value 0x1E, is an invalid character. Line 121, position 40.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
at System.Xml.XmlTextReaderImpl.ParseNumericCharRefInline(Int32 startPos, Boolean expand, StringBuilder internalSubsetBuilder, Int32& charCount, EntityType& entityType)
at System.Xml.XmlTextReaderImpl.ParseCharRefInline(Int32 startPos, Int32& charCount, EntityType& entityType)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at tomenglertde.ResXManager.Model.ResourceLanguage..ctor(String languageName, ProjectFile file)
at tomenglertde.ResXManager.Model.ResourceEntity.<.ctor>b__5(<>f__AnonymousType42 <>h__TransparentIdentifier1)
at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at tomenglertde.ResXManager.Model.ResourceEntity..ctor(String projectName, String baseName, String directory, IEnumerable1 files)
at tomenglertde.ResXManager.Model.ResourceManager.<GetResourceEntities>d__16.MoveNext()
at System.Linq.Buffer
1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable
1.<GetEnumerator>d__0.MoveNext()
at tomenglertde.ResXManager.Model.ResourceManager.InternalLoad(IEnumerable1 fileNamesByDirectory)
at tomenglertde.ResXManager.Model.ResourceManager.Load(IEnumerable
1 allResXFiles)
at tomenglertde.ResXManager_VSIX.MyToolWindow.Solution_Changed(Boolean forceReload)
Oct 22, 2013 at 8:12 PM
An update also,

now I get this error multiple times in a message box every time I load the VS project. Pretty annoying.
Oct 22, 2013 at 8:59 PM
Another project gives me those errors:

Error: System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at System.Runtime.InteropServices.CustomMarshalers.EnumerableViewOfDispatch.GetEnumerator()
at System.Collections.IEnumerable.GetEnumerator()
at System.Linq.Enumerable.<CastIterator>d__b11.MoveNext()
at tomenglertde.ResXManager_VSIX.DteExtensions.GetProjectFiles(ProjectItems projectItems, IDictionary
2 items)
at tomenglertde.ResXManager_VSIX.DteExtensions.GetProjectFiles(Solution solution)
at tomenglertde.ResXManager_VSIX.MyToolWindow.GetProjectFiles()
at tomenglertde.ResXManager_VSIX.MyToolWindow.Solution_Changed(Boolean forceReload)

For now i will have to uninstall the extension :(
Oct 24, 2013 at 5:58 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Oct 28, 2013 at 7:30 PM
Edited Nov 1, 2013 at 11:48 AM
V 1.0.0.26:
1: The error message should now include the name of the file, so you can locate and fix it.
2: Projects that don't load correctly are skipped.
Oct 31, 2013 at 10:52 PM
Sorry, still cannot submit any post in the issue thread, not sure why...

Anyways, I managed to find the problem.

The new error message was not to clear. it was telling me: "No xml root..."

I found that the error is when the resource has the 'ê' character. (I don't know if it's the only invalid character causing this)

Thanks
Nov 2, 2013 at 11:48 AM
I have no problems adding an 'ê'. Maybe the files encoding is mixed up? Can you send me a file that causes the error?