3

TFS2015 vNext build fail with logger error (error message attached below). From my investigation, looks like this is related to CentralLogger - "Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" , when I run the command line build manually without the centrallogger, it works.

Any idea how to solve the issue?

CentralLogger parameter in vNext build: msbuild.exe /fl /nologo /dl:CentralLogger,C:\TFSAgent\Agent\Worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll*ForwardingLogger,C:\TFSAgent\Agent\Worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll

Error Message: MSBUILD : error MSB4166: Child node "Microsoft.Build.Exceptions.InternalLoggerException: The build stopped unexpectedly because of an unexpected logger failure. ---> System.ArgumentException: Illegal characters in path. 2017-01-20T17:40:55.7242247Z MSBUILD : error MSB4166: at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) 2017-01-20T17:40:55.7242247Z MSBUILD : error MSB4166: at System.IO.Path.IsPathRooted(String path) 2017-01-20T17:40:55.7242247Z MSBUILD : error MSB4166: at MSBuild.Logger.ErrorWarningEventMinimumFields.EnsureFullPath(String file, String projectFile, Boolean isFileName) 2017-01-20T17:40:55.7242247Z MSBUILD : error MSB4166: at MSBuild.Logger.ErrorWarningEventMinimumFields..ctor(BuildWarningEventArgs warningEvent, Boolean isStaticAnalysis, Boolean logInformation) 2017-01-20T17:40:55.7242247Z MSBUILD : error MSB4166: at MSBuild.Logger.ProjectTrees.LogWarning(BuildWarningEventArgs warningEvent, Boolean isStaticAnalysis, Boolean logInformation) 2017-01-20T17:40:55.7252248Z MSBUILD : error MSB4166: at MSBuild.Logger.CentralLogger.HandleWarningRaised(Object sender, BuildWarningEventArgs e) 2017-01-20T17:40:55.7252248Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseWarningEvent(Object sender, BuildWarningEventArgs buildEvent) 2017-01-20T17:40:55.7252248Z MSBUILD : error MSB4166: --- End of inner exception stack trace --- 2017-01-20T17:40:55.7252248Z MSBUILD : error MSB4166: at Microsoft.Build.Exceptions.InternalLoggerException.Throw(Exception innerException, BuildEventArgs e, String messageResourceName, Boolean initializationException, String[] messageArgs) 2017-01-20T17:40:55.7252248Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseWarningEvent(Object sender, BuildWarningEventArgs buildEvent) 2017-01-20T17:40:55.7262249Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent) 2017-01-20T17:40:55.7262249Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.EventSourceSink.Consume(BuildEventArgs buildEvent, Int32 sinkId) 2017-01-20T17:40:55.7262249Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(KeyValuePair`2 nodeEvent) 2017-01-20T17:40:55.7262249Z MSBUILD : error MSB4166: at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(Object loggingEvent)

Angel
  • 127
  • 1
  • 11
  • What kind of project do you build? How's your build definition like? If you run the build manually on your build agent machine, using command line with the centrallogger, will you get the same error? – Cece Dong - MSFT Jan 23 '17 at 09:55
  • It is C++ project. Build Definition is using the "Visual Studio Build" task to call the solution, it was set to run with VS2015. – Angel Jan 23 '17 at 19:46
  • Yes, I can reproduce the error if I run the command manually on the build server. And if I remove the centrallogger, it can pass. – Angel Jan 23 '17 at 19:47
  • We just upgraded our project from VS2010, not sure if that matters. build once succeeded with the exact setting (I probably rerun for over 20 times before I got a succeeded one), so it seems it might be timing issue. – Angel Jan 23 '17 at 19:50
  • If you run the project with MSBuild command also get the error, then the issue is not related to TFS, but your project. Try to re-create your project to see whether the issue persists. – Cece Dong - MSFT Jan 24 '17 at 02:10
  • MSBuild Command can pass without the Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll centrallogger. – Angel Jan 25 '17 at 17:44

1 Answers1

2

We solved the issues by building solutions separately. We had a sub-solution called by the main solution, the sub-solution throw some warnings, and seems the TFS logger throw the exception on that.

Angel
  • 127
  • 1
  • 11