2016-07-15 93 views
2

我正在嘗試爲Azure中的Visual Studio Team Services創建一個自定義構建服務器。我在正在運行的虛擬機上安裝了構建代理和Visual Studio Express,並在VisualStudio.com上將其作爲「默認」池中的構建代理連接到我的項目。Visual Studio Team Services在Azure中構建服務器

然而,當我試圖運行構建,我得到了以下錯誤:

No agent found in pool 1 which satisfies the specified demands: 
msbuild 
visualstudio 
vstest 
Agent.Version -gtVersion 1.98.1 

的MSBuild已經在能力上visualstudio.com而不是其他兩個,所以我通過C:\Program Files (x86),並添加挖名單這兩個功能列表:

vstest: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow 
visualstudio: C:\Program Files (x86)\Microsoft Visual Studio 14.0 

構建然後運行至少,但我在「測試組件」的步驟得到另一個錯誤。我認爲錯誤消息的最重要的部分是Unable to determine the location of vstest.console.exe,在這裏它是在充分反正:

System.Management.Automation.CmdletInvocationException: Unable to determine the location of vstest.console.exe ---> System.IO.FileNotFoundException: Unable to determine the location of vstest.console.exe 
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeVSTestCmdlet.GetVsTestLocation() 
at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeVSTestCmdlet.ProcessRecord() 
at System.Management.Automation.CommandProcessor.ProcessRecord() 
--- End of inner exception stack trace --- 
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes) 
at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource) 

我已經看過並vstest.console.exe位於我上面指定的文件夾vstest,我也試着加入該文件夾到系統PATH但這沒有什麼區別。

如何在Azure中設置可用的構建代理?

+0

您安裝了哪個版本的Visual Studio? VS 2015之前?或者你安裝了2015年的社區版嗎? –

回答

1

Visual Studio Express沒有測試工具。根據授權條款安裝Visual Studio社區(假設您符合社區的要求),或您或您的組織獲得許可的Visual Studio版本(專業/企業版)。

0

您需要在構建服務器上安裝Visual Studio。此時,構建代理將識別可用的功能,如msbuild, visualstudio, and vstest

0

I found a solution,你只需說服你的生成機器,它實際上已經安裝了VS。從鏈接:

What worked for me was to create the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0

and within that key, create a new value of type string with name ShellFolder and value C:\Program Files (x86)\Microsoft Visual Studio 14.0.

Hope it helps

1

在TFS構建下測試組件的日誌我看到的錯誤:

System.Management.Automation.CmdletInvocationException: Unable to determine the location of vstest.console.exe

我VSTest設置的Visual Studio 2015年,我用VS/TFS2017所以切換到最新解決了問題:

enter image description here

相關問題