Openra: Running make.cmd fails to find nuget packages

Created on 27 Oct 2018  路  10Comments  路  Source: OpenRA/OpenRA

Issue Summary

OpenRAModSDK make.cmd downloads engine but fails to find any nuget package saying they don't exist. I tried running make.cmd thats in the engine itself and the same issue occurs.

Closest issue I found is https://github.com/OpenRA/OpenRA/issues/14165

System Information

  • Windows 10

Additional Information:

  • Steps to reproduce

    1. Download OpenRAModSDK

    2. Run make.cmd

    3. Run all command

Most helpful comment

I fixed it by adding this after the Test-Path bit for nuget.exe:

./nuget.exe update -self

All 10 comments

The Nuget backend occasionally fails. We don't know why, and it isn't consistent between different people at the same time, so my best guess is that it is something to do with their CDN network. Please try it again later, and I expect it will resolve itself.

I fixed it by adding this after the Test-Path bit for nuget.exe:

./nuget.exe update -self

Tried again and the same error is still occuring.
@mylemans Which file do I add that to. The make file for the SDK?

I would guess makefile of the engine, as it is the one that downloads stuff with nuget.

There are multiple Test-Path bits in the makefiles. Found a Test-Path for nuget.exe inside fetch-thirdparty-deps.ps1 and tried @mylemans suggested fix after it but same issue occurs.

@ChrisDill

There are multiple Test-Path bits in the makefiles. Found a Test-Path for nuget.exe inside fetch-thirdparty-deps.ps1 and tried @mylemans suggested fix after it but same issue occurs.

Try this in there:

if (!(Test-Path "nuget.exe"))
{
echo "Fetching NuGet."
# Work around PowerShell's Invoke-WebRequest not being available on some versions of PowerShell by using the BCL.
# To do that we need to work around further and use absolute paths because DownloadFile is not aware of PowerShell's current directory.
$target = Join-Path $pwd.ToString() "nuget.exe"
(New-Object System.Net.WebClient).DownloadFile("http://nuget.org/nuget.exe", $target)
}
./nuget.exe update -self

Added that to fetch-thirdparty-deps.ps1 but no change. It updates nuget but still fails to find any of the packages.

Getting errors like this.

An error occurred while retrieving package metadata for 'StyleCopPlus.MSBuild.4.7.49.5' from source 'myget.org'.
  Failed to fetch results from V2 feed at 'https://dotnet.myget.org/gallery/Packages(Id='StyleCopPlus.MSBuild',Version='4.7.49.5')' with following message : The content at 'https://dotnet.myget.org/gallery/Packages(Id='StyleCopPlus.MSBuild',Version='4.7.49.5')' is not valid XML.

Myget appears to be a custom package repository. Your system may have been reconfigured to use that instead of the default nuget repository?

We gave up on nuget completely on Linux and macOS because of unreliability issues. I wonder whether we should move Windows over to direct downloads as well.

@pchote Thanks! It was another package source I must have set for something else. Removed it and it now finds the packages and builds correctly.

@ChrisDill So you included this fix in the repo then? Without that nuget update step it didn't work for me at all.

Was this page helpful?
0 / 5 - 0 ratings