Posted on Monday August 29, 2016

Fixing .NET Core package restore problems

I had this problem today where a dotnet restore was failing on a Linux CI server, but working on my Windows 10 dev machine. The error was:

Unable to resolve ‘System.Runtime.Serialization.Formatters (>= 4.0.0-rc4-24217-03)’ for ‘.NETCoreApp,Version=v1.0’.

It turns out I had this package in C:\Users\MyUsername\.nuget\packages so it restored locally, but on the internet the package isn’t at How did I get it originally? That was a mystery that luckily another project in the solution solved by accident.

A lot of the .NET Core nuget packages are hosted on until they’re ready to be fed over to The solution is to add a nuget.config file to your project, with this:

    <add key="" value="" protocolVersion="3" />
    <add key="dotnet-core" value="" />

One hour of my life wasted to save you 1 hour! The myget feed is currently on