Failing to install packages
See original GitHub issueDescription
My issue is that I am not able to install the fo-dicom package. The error that I believe caused this is:
Unable to install package fo-dicom 5.0.2
System.Exception: Failed to install dependency: Microsoft.Bcl.AsyncInterfaces 1.1.1.
Which is in turn caused by:
Unable to retrieve package from http://www.nuget.org/api/v2/Packages(Id='Microsoft.Bcl.AsyncInterfaces',Version='1.1.1')
System.Xml.XmlException: '', hexadecimal value 0x1F, is an invalid character. Line 1, position 1.
I am uncertain what is causing this error outside of a poorly sanitized request. I installed NeGetForUnity using the .unitypackage file. Is their any means that I can repair this or any idea what may have caused this?
- NuGet Package: fo-dicom 5.0.2
- NuGetForUnity Version: 3.0.3
- Unity Version: 2020.3.28f1
- Operating System: Windows
Their were a total of 3 errors thrown, in sequence they were:
Unable to retrieve package from http://www.nuget.org/api/v2/Packages(Id=‘Microsoft.Bcl.AsyncInterfaces’,Version=‘1.1.1’) System.Xml.XmlException: ‘’, hexadecimal value 0x1F, is an invalid character. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String[] args) [0x00029] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.Throw (System.Int32 pos, System.String res, System.String[] args) [0x0000c] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.ThrowInvalidChar (System.Char[] data, System.Int32 length, System.Int32 invCharPos) [0x0000f] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x00139] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <0f9699188f0c414ea6fb5557f5c16d15>:0 at System.Xml.Linq.XDocument.Load (System.Xml.XmlReader reader, System.Xml.Linq.LoadOptions options) [0x00016] in <a9ef27d60e3144519c0741b6584ba229>:0 at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader, System.Xml.Linq.LoadOptions options) [0x0000f] in <a9ef27d60e3144519c0741b6584ba229>:0 at System.Xml.Linq.XDocument.Load (System.IO.TextReader textReader) [0x00000] in <a9ef27d60e3144519c0741b6584ba229>:0 at NugetForUnity.NugetPackageSource.GetPackagesFromUrl (System.String url, System.String username, System.String password) [0x00079] in <6a48cd2923ae4ff490cdbdab680b2a59>:0 at NugetForUnity.NugetPackageSource.GetSpecificPackage (NugetForUnity.NugetPackageIdentifier package) [0x0007b] in <6a48cd2923ae4ff490cdbdab680b2a59>:0 UnityEngine.Debug:LogErrorFormat (string,object[]) NugetForUnity.NugetPackageSource:GetSpecificPackage (NugetForUnity.NugetPackageIdentifier) NugetForUnity.NugetHelper:GetOnlinePackage (NugetForUnity.NugetPackageIdentifier) NugetForUnity.NugetHelper:GetSpecificPackage (NugetForUnity.NugetPackageIdentifier) NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool) NugetForUnity.NugetHelper:Install (NugetForUnity.NugetPackage,bool) NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool) NugetForUnity.NugetWindow:DrawPackage (NugetForUnity.NugetPackage,UnityEngine.GUIStyle,UnityEngine.GUIStyle) NugetForUnity.NugetWindow:DrawPackages (System.Collections.Generic.List`1<NugetForUnity.NugetPackage>) NugetForUnity.NugetWindow:DrawOnline () NugetForUnity.NugetWindow:OnGUI () UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Could not find Microsoft.Bcl.AsyncInterfaces 1.1.1 or greater. UnityEngine.Debug:LogErrorFormat (string,object[]) NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool) NugetForUnity.NugetHelper:Install (NugetForUnity.NugetPackage,bool) NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool) NugetForUnity.NugetWindow:DrawPackage (NugetForUnity.NugetPackage,UnityEngine.GUIStyle,UnityEngine.GUIStyle) NugetForUnity.NugetWindow:DrawPackages (System.Collections.Generic.List`1<NugetForUnity.NugetPackage>) NugetForUnity.NugetWindow:DrawOnline () NugetForUnity.NugetWindow:OnGUI () UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Unable to install package fo-dicom 5.0.2 System.Exception: Failed to install dependency: Microsoft.Bcl.AsyncInterfaces 1.1.1. at NugetForUnity.NugetHelper.Install (NugetForUnity.NugetPackage package, System.Boolean refreshAssets) [0x001a1] in <6a48cd2923ae4ff490cdbdab680b2a59>:0 UnityEngine.Debug:LogErrorFormat (string,object[]) NugetForUnity.NugetHelper:Install (NugetForUnity.NugetPackage,bool) NugetForUnity.NugetHelper:InstallIdentifier (NugetForUnity.NugetPackageIdentifier,bool) NugetForUnity.NugetWindow:DrawPackage (NugetForUnity.NugetPackage,UnityEngine.GUIStyle,UnityEngine.GUIStyle) NugetForUnity.NugetWindow:DrawPackages (System.Collections.Generic.List`1<NugetForUnity.NugetPackage>) NugetForUnity.NugetWindow:DrawOnline () NugetForUnity.NugetWindow:OnGUI () UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5
Thank you @liucl19 and Great help by @sunsetbros and @din82958. Replace the attached dll file into your unity project (in my case Unity 2020.3.29) under the location Assets->Nuget->Editor->NugetForUnity.dll
NugetForUnity.zip
Same problem here:
Update: Fix: download source code, edit Assets/Editor/NugetPackageSource.cs, line 380:
change it to
will fix this problem.