Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexadecimal value 0x00, is an invalid character. Line 1, position 1. #1550

Closed
MatzeG opened this issue Oct 10, 2015 · 10 comments
Closed

hexadecimal value 0x00, is an invalid character. Line 1, position 1. #1550

MatzeG opened this issue Oct 10, 2015 · 10 comments
Labels
Priority:2 Issues for the current backlog. Type:Bug
Milestone

Comments

@MatzeG
Copy link

MatzeG commented Oct 10, 2015

Hello

I get on some Projects the following error and i don´t know how to find it. Any hints? I use VS 2015 and Nuget 3.2.60914.10516

regards Matthias

System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at NuGet.ProjectManagement.XmlUtility.LoadSafe(Stream input, LoadOptions options)
at NuGet.ProjectManagement.XmlUtility.GetDocument(String root, String path)
at NuGet.ProjectManagement.XmlUtility.GetOrCreateDocument(XName rootName, String root, String path, INuGetProjectContext nuGetProjectContext)
at NuGet.PackageManagement.VisualStudio.BindingRedirectManager.GetConfiguration(String configFileFullPath)
at NuGet.PackageManagement.VisualStudio.BindingRedirectManager.AddBindingRedirects(IEnumerable`1 bindingRedirects)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.RuntimeHelpers.d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.<b__59_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()
at NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.AddBindingRedirects()
at NuGet.ProjectManagement.MSBuildNuGetProject.PostProcessAsync(INuGetProjectContext nuGetProjectContext, CancellationToken token)
at NuGet.PackageManagement.NuGetPackageManager.d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.PackageManagement.NuGetPackageManager.d__42.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.UI.UIActionEngine.d__3.MoveNext()

@yishaigalatzer
Copy link

Can you look at your app.config or web.config across your solution?
Can you share the project?

Our error handling should probably call out the file name that is causing this to happen.

@yishaigalatzer yishaigalatzer added Priority:2 Issues for the current backlog. Type:Bug 2 - Working labels Oct 12, 2015
@yishaigalatzer yishaigalatzer added this to the 3.3.0-Beta milestone Oct 12, 2015
@yishaigalatzer yishaigalatzer self-assigned this Oct 12, 2015
yishaigalatzer pushed a commit to NuGet/NuGet.Client that referenced this issue Oct 12, 2015
By throwing an exception with a usefull error message, that would unblock the user.
@yishaigalatzer
Copy link

@Seeker1437
Copy link

Hi there, hate to bring back things from the dead, I am encountering this issue on Nuget 3.4.4 under VIsual Studio 2015.3 I can't figure out what it's looking at.

@yishaigalatzer
Copy link

Can you open a new bug and share a repro? This might be unrelated.

Please share the full error output as well

@db-007
Copy link

db-007 commented Sep 6, 2017

Seeing same issue when I tried installing Xamarin.FFImageLoading.Forms v 2.2.10 package from Package Manager in VS2015
"An error occurred while reading file 'C:\source\SolutionName\ProjectName\ProjectName\packages.config': '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1."

@Seeker1437
Copy link

See #3078 maybe?

@lennybacon
Copy link

#3078 Had the solution for me

& nuget.exe locals -clear temp
& nuget.exe locals -clear global-packages
& nuget.exe locals -clear http-cache

@Himura2la
Copy link

For dotnet core, use dotnet nuget locals --clear global-packages

@aalau
Copy link

aalau commented Mar 16, 2024

For dotnet core, use dotnet nuget locals --clear global-packages

Had the same error and ran the above in developer powershell, then Build > Clean Solution, Rebuild solution.

@Murad-88
Copy link

Murad-88 commented Apr 6, 2024

Severity Code Description Project File Line Suppression State
Error NuGet Package restore failed for project Property: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 1.. Please see Error List window for detailed warnings and errors.

why do I get this error and the file web.config contains nothing of that value, it all started when my collage pushed the project with the new tool used (reportViewer). now I cant restore all the packages and it shows this ! symbol to all references in the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Issues for the current backlog. Type:Bug
Projects
None yet
Development

No branches or pull requests

8 participants