2017-05-14 51 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

相关问题