project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Invalid URI: The Authority/Host could not be parsed

Open emgarten opened this issue 8 years ago • 9 comments

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

emgarten avatar Jan 10 '18 22:01 emgarten

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.

emgarten avatar Jan 10 '18 22:01 emgarten

@BillHiebert this is for Website projects AFAICT - where should this be filed?

Pilchie avatar Jan 11 '18 16:01 Pilchie

any workaround?

Thanks

yarmenteros avatar Jan 16 '18 19:01 yarmenteros

I'm experiencing exactly the same issue. Would really appreciate a workaround...

Many thanks

DrGriff avatar Jan 23 '18 10:01 DrGriff

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.

ricktnal avatar Jan 23 '18 21:01 ricktnal

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 avatar Jan 24 '18 20:01 JeLittl

@JeLittl That also worked for me, thanks!

ricktnal avatar Jan 24 '18 20:01 ricktnal

Reopened NuGet issue# https://github.com/NuGet/Home/issues/6352

jainaashish avatar Jan 25 '18 07:01 jainaashish

Closing this issue in favor of the NuGet one.

Pilchie avatar Jan 30 '18 21:01 Pilchie