问题
I installed TFS 2013 and am having a problem with the build system. I don't use a drop folder, one solution being built, pretty simple config. I am getting the following error which fails the build (some names replaced with AppName to protect the app's identity):
Exception Message: TF270016: An error occurred publishing log files from 'S:\Builds\2\NCSoftware\AppName\src\Solutions\AppName\AppName.log' to '#/198/logs/msbuild/agent-2'. Details: Internal Server Error (type PublishLogFileException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Inner Exception Details: Exception Message: Internal Server Error (type VssServiceResponseException) Exception Stack Trace: at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory) at Microsoft.TeamFoundation.Build.Workflow.Activities.FileContainerDropProvider.CopyDirectory(String sourceDirectory, String targetDirectory, String[] renameIfExists) at Microsoft.TeamFoundation.Build.Workflow.Activities.PublishLogFile.Execute(CodeActivityContext context) An error occurred while copying diagnostic activity logs to the drop location. Details: Internal Server Error An error occurred while copying diagnostic activity logs to the drop location. Details: Internal Server Error
Where is this "#/198/logs/msbuild/agent-2" path that obviously is the cause of this problem?
Thank you.
回答1:
Check your DropLocation variable in your build template.
Simplest way to find where this path is set is to look into your build template and search for e.g. "log". In my case I found only one Activity that assigning logs path to variable. Then you can backtrack all variables in your template to original sources of data. Something like this:
<Assign x:TypeArguments="x:String"
DisplayName="Initialize LogFile Drop Location" To="[logFileDropLocation]"
Value="[If (platformConfiguration.IsEmpty
Or BuildSettings.PlatformConfigurations.Count = 1,
BuildDropProvider.CombinePaths(DropLocation, "logs"), If
(platformConfiguration.IsPlatformEmptyOrAnyCpu,
BuildDropProvider.CombinePaths(DropLocation, "logs",
platformConfiguration.Configuration),
BuildDropProvider.CombinePaths(DropLocation,
"logs", platformConfiguration.Platform,
platformConfiguration.Configuration)))]"
mtbwt:BuildTrackingParticipant.Importance="Low" />
来源:https://stackoverflow.com/questions/19478224/tfs-error-publishing-log-files-to-198-logs-msbuild-agent-2