2015-09-25 84 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

解決的問題。不知道爲什麼發生這種情況,但確定... :)