26Jul, 2023
Moving From Sitecore's MyGet to NuGet Public Feed Might Be a Good Idea After Today's Outage
Many organizations experienced build issues after MyGet's outage on July 26th. The transition to NuGet is coming for later this year, so there's no reason to wait.
For further context, our team saw our build fail during package restoration for one of our projects with errors like this:
Unable to find version '9.1.1' of package 'Sitecore.Zip'. Unable to find version '9.1.1' of package 'Sitecore.Xdb.Processing.Queue'. Unable to find version '9.1.1' of package 'Sitecore.XConnect.Search'. Unable to find version '9.1.1' of package 'Sitecore.XConnect.Diagnostics'. Unable to find version '9.1.1' of package 'Sitecore.XConnect.Client'. Unable to find version '9.1.1' of package 'Sitecore.ExperienceForms.Mvc'. Unable to find version '9.1.1' of package 'Sitecore.ExperienceForms'. Unable to find version '9.1.1' of package 'Sitecore.ContentSearch.Linq'. Unable to find version '9.1.1' of package 'Sitecore.Cloud.Nexus'. Unable to find version '9.1.1' of package 'Sitecore.Client'. Unable to find version '9.1.1' of package 'Sitecore.CES'. Unable to find version '9.1.1' of package 'Sitecore.Analytics.XConnect'. Unable to find version '9.1.1' of package 'Sitecore.Abstractions'. Unable to find version '9.1.0' of package 'Sitecore.Xdb.Common.Web'. Unable to find version '3.1.0' of package 'Sitecore.Framework.Conditions'. Unable to find version '4.0.0' of package 'Sitecore.Framework.Common'. ... ##[error]Error: The process 'C:\hostedtoolcache\windows\NuGet\3.3.0\x64\nuget.exe' failed with exit code 1 ##[error]Packages failed to install
How to Fix This
So it appears we need to update the package source earlier. The original Nuget.config file was changed from:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packagesources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json"></add> <add key="Sitecore" value="https://sitecore.myget.org/F/sc-packages/api/v3/index.json"></add> </packagesources> </configuration
To Nuget https://nuget.sitecore.com/resources/v3/index.json, per the article linked at the top.
<?xml version="1.0" encoding="utf-8"?> <configuration> <packagesources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json"></add> <add key="Sitecore" value="https://nuget.sitecore.com/resources/v3/index.json"></add> </packagesources> </configuration>
After this change everything built according to plan, and the solution is sure to be stable during this step for the foreseeable future.