Share via


Nuget Error Invalid URI: The Authority/Host could not be parsed.

Question

Thursday, February 22, 2018 12:56 AM

Greetings:

I'm running Windows 10 Pro and Visual Studio Pro 2017, version 15.5.7.

  • I have an existing solution with 1 website project and several class libraries.
  • I decided to see if a new AJAX release was available via NuGet.
  • I right clicked my website project and chose Manage NuGet Packages ...
  • My first surprise was finding NuGet did not note I already had a version of AJAX installed for this project.
  • I browsed for AjaxControlToolkit from within NuGet and clicked Install.
  • The result failed with message "Failed to add reference to 'AjaxControlToolkit'.
    Invalid URI: The Authority/Host could not be parsed."
  • I have no memory of this occurring within the last 2 months, approximately.

Is this a Microsoft issue? If so, is there a fix being worked on? If not, whose problem is this?

Thank you advance for any information leading to a solution for these symptoms.

David Bach

All replies (3)

Friday, February 23, 2018 5:41 AM âś…Answered | 1 vote

Hi David,

Welcome to the MSDN forum.

It seems some other community members meet the similar issue in the previous VS 2017 versions, please check this: NuGet fails for website projects hosted on local IIS and you a try with the following workaround:

  1. Close VS and this solution, backup this solution
  2. Open the .sln file in notepad and look for this line: Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite1", "http://localhost/website1", "{F8AAD21F-B817-4561-A49C-65983F6487E8}"
  3. Change the Url to "." if the solution-file is inside the website.
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite1", ".", "{F8AAD21F-B817-4561-A49C-65983F6487E8}"
  4. If the solution-file is outside of the website you can change the property to "WebSite1\:
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "WebSite1(1)", "WebSite1\, "{F8AAD21F-B817-4561-A49C-65983F6487E8}"
  5. Open the solution to use the Nuget again

If this above workaround not works for you, please vote the issue and add your comment, if some other community members share the solution in the future and you can know it, sorry for this inconvenience and thank you for your understanding.

Best regards,

Sara

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Friday, February 23, 2018 7:44 AM

Greetings Sara Liu:

Thank you for your response.

The steps you suggested fixed my issue.

I performed a clean install of Windows 10 Pro 7 days ago. Prior to the clean install, I remember seeing this solution or one very similar to this, however, it did not work for me. The clean install combined with your solution may have helped me to find success in an otherwise frustrating scenario.

Much thanks for your input.

David Bach


Monday, February 26, 2018 1:39 AM

Hi David,

It's my pleasure to help you and so glad to hear that your issue is solved, thank you for your sharing.

Best regards,

Sara

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]