2017-05-14 44 views
0

我確定這是用戶錯誤,但許多Microsoft文檔要麼寫入VSTS管理員,要麼老實說過時(如這些步驟甚至不匹配用於VisualStudio Online的用戶界面。)我已盡了最大的努力來實現這一目標。適用於UWP應用程序的VSTS 2017 CI無法查找文件(NuGet軟件包任務錯誤太多)

的錯誤:

****************************************************************************** 
Starting: NuGet Install for SNR3 
****************************************************************************** 
============================================================================== 
Task   : NuGet Restore 
Description : Restores NuGet packages in preparation for a Visual Studio Build step. 
Version  : 1.0.0 
Author  : Microsoft Corporation 
Help   : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747) 
============================================================================== 
C:\Windows\system32\chcp.com 65001 
Active code page: 65001 
Error: Not found files: d:\a\3\s\SNR3.sln 
Packages failed to restore 

處的誤差V2:

****************************************************************************** 
Starting: NuGet Install for SNR3 
****************************************************************************** 
============================================================================== 
Task   : NuGet Installer 
Description : Installs or restores missing NuGet packages 
Version  : 0.2.31 
Author  : Microsoft Corporation 
Help   : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747) 
============================================================================== 
C:\Windows\system32\chcp.com 65001 
Active code page: 65001 
Error: Not found files: d:\a\3\s\SNR3.sln 
Packages failed to install 

完整的日誌:

Hosted Agent successfully assigned. 
Configuring connection settings for Hosted Agent 
Starting Hosted Agent 
Initializing connection to Hosted Agent 
##[section]Starting: Build 
Current agent version: '2.116.1' 
##[debug]Cleaning agent temp folder: d:\a\_temp 
##[debug]SET TMP=d:\a\_temp 
##[debug]SET TEMP=d:\a\_temp 
##[section]Starting: Initialize Job 
##[debug]Primary repository: Contracts. repository type: TfsVersionControl 
Prepare build directory. 
##[debug]Creating build directory: 'd:\a\1' 
##[debug]Delete existing artifacts directory: 'd:\a\1\a' 
##[debug]Creating artifacts directory: 'd:\a\1\a' 
##[debug]Delete existing test results directory: 'd:\a\1\TestResults' 
##[debug]Creating test results directory: 'd:\a\1\TestResults' 
##[debug]Creating binaries directory: 'd:\a\1\b' 
##[debug]Creating source directory: 'd:\a\1\s' 
Set build variables. 
Download all required tasks. 
Downloading task: NuGetInstaller 
##[debug]Task 'NuGetInstaller' has been downloaded into 'd:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.31'. 
Downloading task: VSBuild 
##[debug]Task 'VSBuild' has been downloaded into 'd:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.113.0'. 
Downloading task: PublishBuildArtifacts 
##[debug]Task 'PublishBuildArtifacts' has been downloaded into 'd:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.0.41'. 
##[section]Finishing: Initialize Job 
##[debug]Evaluating condition for step: 'Get Sources' 
##[debug]Evaluating: succeeded() 
##[debug]Evaluating succeeded: 
##[debug]=> (Boolean) True 
##[debug]Expanded: True 
##[debug]Result: True 
##[section]Starting: Get Sources 
##[debug]Sync source for endpoint: Contracts 
Prepending Path environment variable with directory containing 'tf.exe'. 
##[debug]Path: 'C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.116.1\externals\vstsom;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\;C:\Users\VssAdministrator\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft\Web Platform ... 
Querying workspace information. 
##[debug]tf vc workspaces /format:xml /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[debug]<Workspaces /> 
##[debug]Sources directory does not exist or is empty. 
##[debug]tf vc workspaces ws_1_1 /computer:* /format:xml /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[debug]<Workspaces> 
##[debug] <Workspace computer="FACTORYVM-38" islocal="true" name="ws_1_1" ownerdisp="Project Collection Build Service (bytemedev)" ownerid="b58bda4f-3d2b-42b9-92af-0459c5f935e1:Build:6efb2b2a-0a99-489e-826b-892f9a3ad494" ownertype="Microsoft.TeamFoundation.ServiceIdentity" owner="c1289161-e96b-4d2f-8b38-2d28cb3f20de" owneruniq="c1289161-e96b-4d2f-8b38-2d28cb3f20de"> 
##[debug] <Comment /> 
##[debug] <Folders> 
##[debug] <WorkingFolder local="d:\a\1\s\Contracts" item="$/Contracts" /> 
##[debug] <WorkingFolder item="$/Contracts/Drops" type="Cloak" /> 
##[debug] </Folders> 
##[debug] <LastAccessDate>2017-05-14T20:57:33.677+00:00</LastAccessDate> 
##[debug] <OwnerAliases> 
##[debug] <string>Build\6efb2b2a-0a99-489e-826b-892f9a3ad494</string> 
##[debug] <string>6efb2b2a-0a99-489e-826b-892f9a3ad494</string> 
##[debug] <string>Project Collection Build Service (bytemedev)</string> 
##[debug] </OwnerAliases> 
##[debug] </Workspace> 
##[debug]</Workspaces> 
##[command]tf vc workspace /delete ws_1_1;c1289161-e96b-4d2f-8b38-2d28cb3f20de /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[debug]Deleting: 'd:\a\1\s'. 
##[command]tf vc workspace /new /location:local /permission:Public ws_1_1 /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /unmap /workspace:ws_1_1 $/ /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /map /workspace:ws_1_1 $/Contracts d:\a\1\s\Contracts /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /cloak /workspace:ws_1_1 $/Contracts/Drops /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc get /version:497 /recursive /overwrite d:\a\1\s /loginType:OAuth /login:.,******** /noprompt 
All files are up to date. 
##[section]Finishing: Get Sources 
##[debug]Evaluating condition for step: 'NuGet install $/Contracts/SNR3/SNR3.sln' 
##[debug]Evaluating: succeeded() 
##[debug]Evaluating succeeded: 
##[debug]=> (Boolean) True 
##[debug]Expanded: True 
##[debug]Result: True 
##[section]Starting: NuGet install $/Contracts/SNR3/SNR3.sln 
============================================================================== 
Task : NuGet Installer 
Description : Installs or restores missing NuGet packages 
Version : 0.2.31 
Author : Microsoft Corporation 
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613747) 
============================================================================== 
##[debug]tf vc resolvePath $\Contracts\SNR3\SNR3.sln /loginType:OAuth /login:.,******** /noprompt 
##[debug]d:\a\1\s\Contracts\SNR3\SNR3.sln 
##[debug]tf vc resolvePath $\Contracts\SNR3\SNR3\nuget.config /loginType:OAuth /login:.,******** /noprompt 
##[debug]d:\a\1\s\Contracts\SNR3\SNR3\nuget.config 
##[debug]agent.workFolder=d:\a 
##[debug]loading inputs and endpoints 
##[debug]loading ENDPOINT_AUTH_$/ 
##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN 
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN 
##[debug]loading ENDPOINT_AUTH_SCHEME_$/ 
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION 
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION 
##[debug]loading INPUT_NOCACHE 
##[debug]loading INPUT_NUGETCONFIGPATH 
##[debug]loading INPUT_NUGETVERSION 
##[debug]loading INPUT_RESTOREMODE 
##[debug]loading INPUT_SOLUTION 
##[debug]loading INPUT_VERBOSITY 
##[debug]loaded 12 
##[debug]check path : d:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.31\task.json 
##[debug]set resource file to: d:\a\_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.31\task.json 
##[debug]system.culture=en-US 
##[debug]Absolute path for pathSegments: C:\Windows\system32\chcp.com = C:\Windows\system32\chcp.com 
##[debug]check path : C:\Windows\system32\chcp.com 
##[debug]C:\Windows\system32\chcp.com=C:\Windows\system32\chcp.com 
##[debug]C:\Windows\system32\chcp.com arg: ["65001"] 
##[debug]C:\Windows\system32\chcp.com arg: ["65001"] 
##[debug]exec tool: C:\Windows\system32\chcp.com 
##[debug]exec tool: C:\Windows\system32\chcp.com 
##[debug]Arguments: 
##[debug]Arguments: 
##[debug] 65001 
##[debug] 65001 
[command]C:\Windows\system32\chcp.com 65001 
Active code page: 65001 
##[debug]solution=d:\a\1\s\Contracts\SNR3\SNR3.sln 
##[debug]System.DefaultWorkingDirectory=d:\a\1\s 
##[debug]pattern: d:\a\1\s\Contracts\SNR3\SNR3.sln, isNegative: false 
##[debug]check path : d:\a\1\s\Contracts\SNR3\SNR3.sln 
##[error]Error: Not found files: d:\a\1\s\Contracts\SNR3\SNR3.sln 
##[debug]Processed: ##vso[task.issue type=error;]Error: Not found files: d:\a\1\s\Contracts\SNR3\SNR3.sln 
##[debug]task result: Failed 
##[error]Packages failed to install 
##[debug]Processed: ##vso[task.issue type=error;]Packages failed to install 
##[debug]Processed: ##vso[task.complete result=Failed;]Packages failed to install 
##[section]Finishing: NuGet install $/Contracts/SNR3/SNR3.sln 
##[debug]Evaluating condition for step: 'Build solution $/Contracts/SNR3/SNR3.sln' 
##[debug]Evaluating: succeeded() 
##[debug]Evaluating succeeded: 
##[debug]=> (Boolean) False 
##[debug]Expanded: False 
##[debug]Result: False 
##[debug]Evaluating condition for step: 'Publish Artifact: drop' 
##[debug]Evaluating: succeededOrFailed() 
##[debug]Evaluating succeededOrFailed: 
##[debug]=> (Boolean) True 
##[debug]Expanded: True 
##[debug]Result: True 
##[section]Starting: Publish Artifact: drop 
============================================================================== 
Task : Publish Build Artifacts 
Description : Publish Build artifacts to the server or a file share 
Version : 1.0.41 
Author : Microsoft Corporation 
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708390) 
============================================================================== 
##[debug]agent.workFolder=d:\a 
##[debug]loading inputs and endpoints 
##[debug]loading ENDPOINT_AUTH_$/ 
##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN 
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN 
##[debug]loading ENDPOINT_AUTH_SCHEME_$/ 
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION 
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION 
##[debug]loading INPUT_ARTIFACTNAME 
##[debug]loading INPUT_ARTIFACTTYPE 
##[debug]loading INPUT_PATHTOPUBLISH 
##[debug]loading INPUT_TARGETPATH 
##[debug]loaded 10 
##[debug]check path : d:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.0.41\task.json 
##[debug]set resource file to: d:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.0.41\task.json 
##[debug]system.culture=en-US 
##[debug]system.hostType=build 
##[debug]PathtoPublish=d:\a\1\a\AppxPackages 
##[debug]check path : d:\a\1\a\AppxPackages 
##[debug]task result: Failed 
##[error]Publish build artifacts failed with error: Not found PathtoPublish: d:\a\1\a\AppxPackages 
##[debug]Processed: ##vso[task.issue type=error;]Publish build artifacts failed with error: Not found PathtoPublish: d:\a\1\a\AppxPackages 
##[debug]Processed: ##vso[task.complete result=Failed;]Publish build artifacts failed with error: Not found PathtoPublish: d:\a\1\a\AppxPackages 
##[section]Finishing: Publish Artifact: drop 
##[debug]Evaluating condition for step: 'Post Job Cleanup' 
##[debug]Always run post-job step: 'Post Job Cleanup' 
##[section]Starting: Post Job Cleanup 
##[section]Finishing: Post Job Cleanup 
##[debug]Cleaning agent temp folder: d:\a\_temp 
##[section]Finishing: Build 

飼料網址: http://nuget.syncfusion.com/nuget_universalwindows/nuget/getsyncfusionpackages/universalwindows

事情使我的情況有點獨特,我使用定製的NuGet feed作爲Syncfusion控件。我確實已經讀過它,絕對有必要在自定義提要中有一個NuGet.config(一個不是在VS2017和UWP Creator的更新版本中生成的),所以我這樣做,將它添加到我的源代碼管理中,並將其簽入。

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <packageSources> 
    <clear /> 
    <add key="Syncfusion UWP" value="http://nuget.syncfusion.com/nuget_universalwindows/nuget/getsyncfusionpackages/universalwindows" /> 
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> 
    </packageSources> 
    <activePackageSource> 
    <add key="All" value="(Aggregate source)" /> 
    </activePackageSource> 
</configuration> 

事情我已經嘗試:

  • 的NuGet任務v 0 *而不是1 *
  • 的NuGet安裝與恢復
  • 的NuGet版本3.3.0,3.5.0,4.0。 0
  • 起動從頭開始使用UWP模板。
  • 從泛型Visual Studio模板開始。
  • 生成代理,缺省值(不工作),託管和託管2017

下面是最新的UI /配置選項的屏幕截圖。也許有人可以看到我的錯誤?

Source Control/Workspace Map

Tasks - Processes

Get Sources

NuGet Install

Build

Copy Files

Publish

+0

當您安裝VS2017時是否收到任何警告?我對Xamarin有一個問題,因爲安裝不「清晰」。 – shinjidev

+0

基於日誌,它說所有文件都是最新的,並且工作文件夾是d:\ a \ 1 \ s \與$/Contracts(與您配置的工作區映射不同)的合同,看起來文件不被下載,嘗試創建一個新的構建定義,構建隊列並檢查結果。 –

+0

他們只是來自不同運行的日誌,我很抱歉。我已經嘗試過多次重新工作。 D:\ a \ 1 \ s \恰好是該映射到$ Contracts \ SNR3的運行中的本地目錄。我嘗試了所有人都知道的組合。如果我不得不猜測,它不會將源代碼複製到源文件夾。當我執行推薦的設置時,它所做的只是掃描$ tf文件夾,該文件夾位於Contracts上方的目錄中,因此它甚至不在存儲庫的範圍內! @shinjidev我沒有,這不是一個Xamarin解決方案。 – HouseCat

回答

0

我已經刪除了我的整個Visual Studio團隊服務(VSTS在線)賬戶糾正我的問題。

  • 創建一個新的VSTS在線帳戶。
  • 創建一個新項目。
  • 創建本地映射(我的開發盒)。
  • 打開我的解決方案,添加到源代碼管理,並簽入更改。

希望這可以幫助別人誰卡住這一點。

我成功地使用VSTS到CI構建UWP(造物主的更新2017)應用程序使用這些設置:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

+0

您可以進入版本控制管理頁面(https:// [account] .visualstudio.com/[project]/_admin/_versioncontrol)並選擇一個項目,然後檢查Project Collection Build Service和Project Collection Build Service Accounts權限(Read )。另一方面,你可以接受它作爲答案。 –

0

根據日誌,您使用的是託管構建代理,這意味着源代碼不應該存在於構建代理之前。但是構建日誌表明,由於「所有文件都是最新的」,因此在第一個「獲取源」步驟中沒有下載文件。

##[command]tf vc workspace /new /location:local /permission:Public ws_1_1 /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /unmap /workspace:ws_1_1 $/ /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /map /workspace:ws_1_1 $/Contracts d:\a\1\s\Contracts /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc workfold /cloak /workspace:ws_1_1 $/Contracts/Drops /collection:https://houseofcat.visualstudio.com/ /loginType:OAuth /login:.,******** /noprompt 
##[command]tf vc get /version:494 /recursive /overwrite d:\a\1\s /loginType:OAuth /login:.,******** /noprompt 
All files are up to date. 

這可能是由以下原因引起:

  1. 你的源代碼是不是簽入VSTS成功。打開VSTS Web Portal,然後轉到「代碼」集線器,檢查是否可以看到您的源代碼。

  2. 的「工作區映射」,在不正確的「獲取資源」的步驟。點擊「...」按鈕選擇想要映射的正確文件夾,然後再次嘗試編譯。 enter image description here

+0

兩者都已簽入,並且如果您注意到,我會直接導航到屏幕截圖中的SLN。當打開FolderPicker時,含義TFS存儲庫可用。這意味着它能夠讀取那裏的文件。 – HouseCat

+0

我嘗試了明顯的嘗試之後,我已經完全在字面上嘗試了存儲庫中的每個文件夾,用於工作區映射。我的意思是我絕對相信你,但我不能強迫VSTS/TFS查看這些文件,你知道我的意思嗎? – HouseCat

相關問題