2015-09-25 89 views
4

默认情况下,TFS Build在Visual Studio生成定义中创建一个“索引源&发布符号”步骤。当该步的属性“发布符号路径”为空时,一切正常。但是,路径设置到本地目录时,该步骤生成以下错误:索引源和发布符号步骤在TFS 2015中失败

2015-09-25T11:00:09.7991491Z Executing the powershell script: C:\NewAgent\tasks\PublishSymbols\1.0.4\PublishSymbols.ps1 
2015-09-25T11:00:10.0022755Z Find-Files -SearchPattern **\bin\**\*.pdb -RootFolder C:\NewAgent\_work\990dcb3f\Projects 
2015-09-25T11:00:10.0491548Z Found 15 files to index... 
2015-09-25T11:00:10.0491548Z Invoke-IndexSources -RepositoryEndpoint <repositoryEndpoint> -SourceFolder C:\NewAgent\_work\990dcb3f\Projects -PdbFiles <pdbFiles> 
2015-09-25T11:00:10.6272794Z Invoke-PublishSymbols -PdbFiles <pdbFiles> -Share C:\DebugSymbols -Product EntityMapper -Version 20150925.14 -MaximumWaitTime 7200000 -MaximumSemaphoreAge 1440 -ArtifactName 
2015-09-25T11:00:10.7348541Z ##[error]Can't infer artifact type from artifact location C:\DebugSymbols. 
2015-09-25T11:00:10.7504779Z 
2015-09-25T11:00:10.7504779Z Start: AssociateArtifact 
2015-09-25T11:00:10.7504779Z ##[error]Artifact Type is required. 
2015-09-25T11:00:10.7504779Z End: AssociateArtifact 

的PDB文件发布到指定的目录,所以我真的不明白是什么原因造成的错误(当时的原因整个构建工作失败)。

回答

0

When the step's property "Path to publish symbols" is empty, everything works fine.

是的,因为如果符号路径没有设置,脚本只索引源,不发布符号。

But when setting the path to a local directory, the step generates the error

您需要prepare your symbol store。在你的案例设置文件夹共享和权限。

+0

即使将权限设置为本地文件夹上的Everyone的完全控制,发布符号步骤也会导致上述错误。 – Jensen

0

在我的情况下改变 “路径发布的符号”,从

//myserver/symbols

\\myserver\symbols

解决的问题。不知道为什么发生这种情况,但确定... :)