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:
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 <name>” error for StructureMap 4.4, but updating the feed to the v3 feed fixed the problem on the build server:
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 <name>” errors in your nuget restore logs, consider updating your package source to the latest version.