NuGet package restore failing for .NET Core 2.0 since Dec 13 Windows image update

Chris Maddock's Avatar

Chris Maddock

22 Dec, 2018 08:07 PM

Hi,

The NUnit Console Appveyor builds started failing with the Dec 13 Appveyor Windows update, with the following message:

error NU3005: Package 'Microsoft.NETCore.Platforms 2.0.0' from source 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder': The package signature file entry is invalid. The central directory header field 'compression method' has an invalid value (8).

This appears to be the same issue as seen here which eventually lead on to this open NuGet issue.

For the time being, we're using the Previous Visual Studio 2017 image, which has got us back up and running. That's of course only a temporary solution however, which will run out when appveyor next updates.

I'm not seeing this problem outside of Appveyor, either locally or on our other CI systems, so I'm not 100% clear how to pinpoint the problem. There are a few cache clearing workarounds listed on the NuGet issue - could it be possible that Appveyor is caching some problematic packages here - and would it be possible to try and clear this?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 22 Dec, 2018 10:22 PM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    Please check this build completed after this commit. Seems that this issue it is now exposed in specific (15.9.21+g9802d43bc3) version of msbuild.

    I think I have to update Nuget issue you mentioned. And at least we have a workaround for the next image update (though I hope it will be fixed in the next msbuild version).

    Please let us know what you think.

    Ilya.

  2. 2 Posted by Chris Maddock on 23 Dec, 2018 11:42 AM

    Chris Maddock's Avatar

    Hi Ilya,

    Wow - cool! Can I ask how you came to the conclusion that running nuget restore separately would fix the build? I'm not sure how the behaviour differs here with doing the NuGet restore separately vs doing it via MSBuild.

    Would you like to PR that change, given it's your work? I can add the line in if not.

    Thanks for your help!
    Chris

  3. Support Staff 3 Posted by Ilya Finkelshte... on 24 Dec, 2018 08:36 PM

    Ilya Finkelshteyn's Avatar

    Hi Chris,

    Thanks :) Honestly, just educated guess... I see that restore uses msbuild here and it's version was changed with image. Also while glancing over issue you referenced, I noticed that behavior differs with different nuget versions.

    I hesitate to send a PR, as I am not sure that is a 100% proper solution. It is good we have a "plan B" workaround for next image update. If you need to use current image asap (besides software updates it starts 30 seconds faster), feel free to use this workaround.

    Please watch issue -- it is assigned to the next-image-update milestone, so we will test this scenario on a new image before releasing to see if it works with next msbuild version or workaround is required.

    Also ensure you are subscribed to the Technical updates at https://ci.appveyor.com/notifications to avoid image update surprises.

    Ilya.

  4. 4 Posted by Chris Maddock on 05 Jan, 2019 07:52 PM

    Chris Maddock's Avatar

    Thanks Ilya - I've put your suggestion in place myself - I'm more comfortable with something that we hope won't fall over at a certain point in the future.

    Thanks for your help with this - fingers crossed the next MSBuild update resolves this!

  5. Support Staff 5 Posted by Ilya Finkelshte... on 18 Apr, 2019 06:16 AM

    Ilya Finkelshteyn's Avatar

    This workaround does not need after recent build worker image update.

  6. Ilya Finkelshteyn closed this discussion on 18 Apr, 2019 06:16 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac