Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AutoMapper package 5.1.1 is not found when Nuget restore on hosted build agent in Visual Studio Team Services

Really weird problem with restoring AutoMapper on the hosted build agent in Team Services (previously VSO). It just fails with a Warning 'Unable to find version 5.1.1 of package AutoMapper'.

We have a custom and private nuget repo so we've had to add a nuget.config to list all the sources but for some reason AutoMapper cannot be found! It works perfectly fine in Visual Studio IDE even after deleting the packages folder.

To test out if it is the custom setting with nuget sources, I've created a build for another solution which happily goes past the restore as there is no reference to AutoMapper there.

I cannot conclude it is AutoMapper because it works from IDE but I cannot say that the nuget.config is a problem either because the second solution works (has a different issue

like image 825
amythn04 Avatar asked Sep 16 '16 20:09

amythn04


1 Answers

Sounds like the VSO build agent does not have the latest NuGet client installed. It's this reason that I include nuget.exe in my repository - too many times NuGet client breaks against nuget.org.

like image 179
Jimmy Bogard Avatar answered Sep 20 '22 23:09

Jimmy Bogard