Problem with package restore CMS 12

Vote:
 

I'm having intermittent problems with package restore in a DotNetCoreCLI publish step in an Azure Devops pipeline. The step sometimes fail with:

/home/vsts/work/1/s/src/Mikael.Web/Mikael.Web.csproj : error NU1102: Unable to find package EPiServer.CMS.AspNetCore.Mvc with version (= 12.8.0)
/home/vsts/work/1/s/src/Mikael.Web/Mikael.Web.csproj : error NU1102: - Found 12 version(s) in optimizely [ Nearest version: 12.7.0 ]
Sometimes it's rectified by just re-running the pipeline but other times it seems like I have to wait a while before I can run it successfully.
I'm running it on a vmImage with ubuntu-22.04.
Anyone have any clue here?
/Mikael
#286832
Edited, Sep 08, 2022 12:54
Vote:
 

I've experienced this and there was a number of changes I made to resolve it...although it's not happened since, im half expecting it to appear again. I still don't quite understand the underlaying issue but here's what I did in reverse order:

  • Move nuget.config from your web project into your solution folder.
  • In the build pipeline - Add the step nugettoolinstaller before you call restore and mark 'checklatest' : true.
  • In the build pipeline - In the restore step; set "feedsToUse" : config, nugetCOnfigPath: ./nuget.config and noCache : true
#286857
Edited, Sep 08, 2022 19:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.