Visual Studio Team Services持续集成:NuGet还原任务失败 [英] Visual Studio Team Services Continuous Integration: NuGet Restore Task Failed

查看:120
本文介绍了Visual Studio Team Services持续集成:NuGet还原任务失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Team Services(是Visual Studio Online)中的持续集成功能.我的构建定义针对的是解决方案(而不是整个解决方案)中的特定项目,这是ClientUI MVC网站.

I am using Continuous Integration feature in Team Services (was Visual Studio Online). My build definition targets a specific project in a solution (not the whole solution), which is ClientUI MVC website.

该解决方案包含三个项目:

The solution contains three projects:

  1. ClientUI
  2. AdminUI
  3. 客户服务

ClientUI项目的构建定义:

The Build Definition for ClientUI Project:

存储库:

Nuget Installer 步骤: 我尝试了不同的参数,但无法正常工作.

Nuget Installer Step: I have tried different params but not working.

Visual Studio构建

在尝试定位单个项目之前,我的构建定义使用以下参数定位了整个解决方案:

Before trying to target the a single project, my build definition was targeting the whole solution with the following parameters:

  1. NuGet安装程序-> 解决方案的路径:** \ *.sln
  2. Visual Studio构建-> 解决方案:** \ *.sln; MSBuild参数:/p:outdir=$(build.artifactstagingdirectory)
  1. NuGet Installer -> Path to Solution: **\*.sln
  2. Visual Studio Build -> Solution: **\*.sln ; MSBuild Arguments: /p:outdir=$(build.artifactstagingdirectory)

正在工作.但是现在,它在Nugget Restore Task中产生了此错误:

It was working. However now, it generates this error in the Nugget Restore Task:

2016-04-22T21:07:00.6716725Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.98.1\tasks\NuGetInstaller\0.1.25
2016-04-22T21:07:00.8163908Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.98.1\tasks\NuGetInstaller\0.1.25\NuGetInstaller.ps1


2016-04-22T21:07:01.5283529Z ##[error]Cannot find path 'C:\a\1\s\packages.config' because it does not exist.
2016-04-22T21:07:01.5439897Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.98.1\agent\worker\tools\NuGet.exe restore "C:\a\1\s\packages.config"  -NonInteractive


2016-04-22T21:07:03.0441507Z MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.


2016-04-22T21:07:03.0597010Z ##[error]Cannot determine the packages folder to restore NuGet packages. Please specify either -PackagesDirectory or -SolutionDirectory.
2016-04-22T21:07:03.0909881Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe

推荐答案

尝试将"Nuget Installer"任务的安装类型"设置为安装",因为您正在使用"packages.config"来安装软件包.

Try setting "Installation type" to "Install" for "Nuget Installer" task since you are using "packages.config" to install the packages.

这篇关于Visual Studio Team Services持续集成:NuGet还原任务失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆