Invalid URI: The Authority/Host could not be parsed
From @vsfeedback on December 21, 2017 23:16
I'm using NuGet within Visual Studio 2017, when i try to install a package on an Web Forms project hosted in local IIS, it is failing with the following error:
Invalid URI: The Authority/Host could not be parsed
This is package manager console details:
Attempting to gather dependency information for package 'Newtonsoft.Json.10.0.3' with respect to project 'http://iis.domain.local/', targeting '.NETFramework,Version=v4.5.1' Gathering dependency information took 222,41 ms Attempting to resolve dependencies for package 'Newtonsoft.Json.10.0.3' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'Newtonsoft.Json.10.0.3' Resolved actions to install package 'Newtonsoft.Json.10.0.3' Retrieving package 'Newtonsoft.Json 10.0.3' from 'nuget.org'. Adding package 'Newtonsoft.Json.10.0.3' to folder 'E:\Progetti_VBNET\customer\project\packages' Added package 'Newtonsoft.Json.10.0.3' to folder 'E:\Progetti_VBNET\customer\project\packages' Install failed. Rolling back... Package 'Newtonsoft.Json.10.0.3' does not exist in project 'http://iis.domain.local/' Removing package 'Newtonsoft.Json.10.0.3' from folder 'E:\Progetti_VBNET\customer\project\packages' Removed package 'Newtonsoft.Json.10.0.3' from folder 'E:\Progetti_VBNET\customer\project\packages' Executing nuget actions took 860,1 ms Failed to add reference to 'Newtonsoft.Json'. Invalid URI: The Authority/Host could not be parsed. Time Elapsed: 00:00:01.2113135
This error appear with all packages that i try to install. This error appears after windows fall creators update and last visual studio version. In another PC with older version of visual studio and windows creators uptdate, the packages are installed correctly.
This issue has been moved from https://developercommunity.visualstudio.com/content/problem/170931/invalid-uri-the-authorityhost-could-not-be-parsed.html VSTS ticketId: 541991 These are the original issue comments:
Matteo Gattei on 12/20/2017, 01:37 AM (37 hours ago):
Are you able to see any already installed package?
Check also this thread: https://developercommunity.visualstudio.com/content/problem/167181/update-1551-nuget-does-not-work-anymore-on-my-solu.html
s ei on 12/20/2017, 11:37 PM (15 hours ago): After installing update to 15.5.2, nuget doesn't see any installed packages. Attempting to isntall a package ends up with failure described above. These are the original issue solutions: (no solutions)
Copied from original issue: NuGet/Home#6352
From @jainaashish on December 22, 2017 18:22
Failed to add reference to 'Newtonsoft.Json'.
Invalid URI: The Authority/Host could not be parsed.
This should be moved to Project System for investigation. This error is being thrown from them while adding reference. There was a email communication as well for the same issue and there also I added project system folks to investigate.
@BillHiebert this is for Website projects AFAICT - where should this be filed?
any workaround?
Thanks
I'm experiencing exactly the same issue. Would really appreciate a workaround...
Many thanks
I am also experiencing this issue in VS 2017 15.5.4, others using our project and earlier releases of VS 2017 are not having this issue.
This solved the problem for me https://stackoverflow.com/questions/47843907/nuget-package-install-error-invalid-uri-the-authority-host-could-not-be-pars
I manually modified my sln file, changed the second parameter of the Project to "." It is not a great solution but it did allow me to update my NuGet packages in VS 2017.
@JeLittl That also worked for me, thanks!
Reopened NuGet issue# https://github.com/NuGet/Home/issues/6352
Closing this issue in favor of the NuGet one.