Workaround for nuget restore error available as Windows image edge release

Hi,

Some users of our Windows executor images may have experienced a recent issue with nuget restore failing to download packages from the nuget.org package source when running choco install before running nuget restore, occurring since around April 21st.

This is due to an update to our Windows images which included an update to the version of NuGet installed on them. The error with nuget restore happens because of a combination of Chocolatey’s behavior of creating an empty user-wide NuGet config file with no configured feeds upon running choco install, and recent changes in how NuGet handles an empty NuGet config file. Users who already have a project-level NuGet config file should not encounter the issue. For more details on this, you can refer to https://github.com/chocolatey/choco/issues/2233 and https://github.com/NuGet/Home/issues/10804.

While we are uncertain if this new “incompatibility” between Chocolatey and NuGet will be addressed in the future, we are implementing a temporary workaround to include in our Windows images a user-wide NuGet config file with nuget.org configured as a package source. Though we recommend avoiding this issue by including a project-level NuGet config file, we are implementing this workaround to provide convenience for NuGet users. (We may update our images to remove the NuGet config file at a later date if the workaround becomes no longer necessary)

If you are interested in trying out the workaround, you may update your Windows executor configuration to use the edge version. The edge releases will be promoted to become stable releases in approximately 24-48h (April 29 - 30th 2021 12PM UTC) if no major new issues are found with them.

Our Windows edge releases can be used in jobs via the executors in the circleci/windows orb, by configuring edge as the value of the version parameter.

Example of how to use the edge release of the default Windows image:

orbs:
  windows: circleci/windows@2.4.0
...
executor:
  name: windows/default
  version: edge

Example of how to use the edge release of the Windows Nvidia GPU image:

orbs:
  windows: circleci/windows@2.4.0
...
executor:
  name: windows/gpu-nvidia
  version: edge

Thank you and happy building!

2 Likes

The edge releases have now been promoted to stable, so they are now widely available (i.e. you can access the workaround without having to use the edge releases anymore)

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.