Nuget Package Source Update Important

Date Published: 07 September 2016

Nuget Package Source Update Important

Today a client reported an issue with their build server, which was failing to locate version 4.4 of StructureMap. The build worked fine, locally, on more than one machine. After some investigation, we discovered that the build server’s Nuget task was configured to use several sources, including an internal feed the client uses, and this one:

https://www.nuget.org/api/v2/

This is obviously a slightly older feed, but it checks out…

In fact, it’s been working without issues forever (and in fact it still works fine for every other project and package this client is using). I’m not sure why it blows up with a “Cannot find package ” error for StructureMap 4.4, but updating the feed to the v3 feed fixed the problem on the build server:

https://api.nuget.org/v3/index.json

One possible cause is that the solution is also using an older version of StructureMap in another project – no other solution the build server is working with has more than one version of StructureMap in it. In any case, if you see weird “Cannot find package ” errors in your nuget restore logs, consider updating your package source to the latest version.

Steve Smith

About Ardalis

Software Architect

Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.