在Visual Studio Team Services中托管的构建代理上还原Nuget时找不到AutoMapper软件包5.1.1
在Team Services(以前是VSO)中的托管构建代理上还原AutoMapper时,确实出现了奇怪的问题.只是失败并显示警告无法找到软件包AutoMapper的5.1.1版本".
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'.
我们有一个自定义和私有的nuget仓库,因此我们不得不添加nuget.config列出所有源,但是由于某些原因,找不到AutoMapper!即使删除了packages文件夹,它在Visual Studio IDE中也能正常工作.
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.
要测试它是否是带有nuget源的自定义设置,我为另一个解决方案创建了一个构建,该构建很高兴地通过了还原,因为那里没有对AutoMapper的引用.
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.
我不能断定它是AutoMapper,因为它可以在IDE中运行,但是我不能说nuget.config是一个问题,或者是因为第二种解决方案有效(具有不同的
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
我们解决了这个问题,方法如下:
We got around this problem and here's how:
当我们在构建过程中添加了nuget config部分时,问题就开始了,因为我们也有自己的nuget服务器以及内部软件包.
The problem started when we added nuget config part of the build process as we have our own nuget server as well for packages that are internal.
尝试ExpressMapper并将其用于某些组件之后,我们发现AutoMapper是我们使用的某些软件包的依赖软件包,因此我们必须找到一种使用automapper的方法.
After trying ExpressMapper and working with it for some components, we found that AutoMapper is a dependent package for some of the packages we use so we had to find a way to use automapper.
我们构建了所需的automapper软件包版本,并将其上传到我们自己的nuget服务器,并且可以正常工作.我希望这对某人有帮助.
we built automapper package version we needed and uploaded it to our own nuget server and that worked. I hope this helps someone.