Adding Docker support to a ASP.NET Application - asp.net-mvc

I'm working on adding Docker support to an established asp application that has been working great. I was hoping to leverage VS2017 Docker features and functionality by just hitting "add Docker support" and seeing what that "F5 experience" would be like. As luck would have it I was immediately plagued with errors that are a bit cryptic
1>------ Build started: Project: docker-compose, Configuration: Release Any CPU ------
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: The "ResolveProjectInputAndOutput" task failed unexpectedly.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: System.ArgumentNullException: Value cannot be null.
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: Parameter name: path1
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: at System.IO.Path.Combine(String path1, String path2)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: at Microsoft.Docker.BuildTasks.ResolveProjectInputAndOutput.ResolveRelativeOutputAssemblyPath(TargetOS targetOS, TargetFramework targetFramework, DockerDevelopmentMode developmentMode)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: at Microsoft.Docker.BuildTasks.ResolveProjectInputAndOutput.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.Docker.targets(80,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I popped over to the file in question and it's specifically an issue here:
<Target Name="DockerResolveProjectInputAndOutput">
<ResolveProjectInputAndOutput ProjectDirectory="$(MSBuildProjectDirectory)" DockerComposeProjectPath="$(DockerComposeProjectPath)" OutputPath="$(OutputPath)" References="#(Reference)" TargetFileName="$(TargetFileName)" TargetPath="$(TargetPath)" />
</Target>
So I took a peak in the proj file to see if there are any Docker specific issues that can be found. I only found one reference here:
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
It seems like some configuration hasn't been properly done and it's causing this issue, but haven't had much luck figuring out what/where it would be.

In my case the issue was this: We had a bunch of configurations (Dev, Test, Beta, Prod, Debug, and Release). But, in the project file of the app I was trying to add container support to we didn't have a <PropertyGroup> section for Debug. That section is where the OutputPath is.
Oddly, I got the error even when running in the Dev config.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Dev\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

Related

Cordova Ionic app in Visual Studio 2017 iOS remote build

After a week of messing around with my setup to build the Android version with SDK 32, I been struggling with iOS remote build for days, I'm stuck on the error below.
If anyone can suggest anything or a setup which works I would be very grateful.
My setup is
Windows 10 - Visual Studio 2017 Professional 2017 v15.9.51
SDK Build Tool: 32.0.0
Cordova 11.1.0
android 10.1.2
ios 6.2.0
node 14.17.3 (I've also tried 13.14.0 & 18.13.0 LTS)
npm 9.1.2 (I've also tried 6.14.13, 7.7.6 & 8.1.0)
java 11.0.17
The apple Mac is running Ventura 13. / Xcode 14.2, its viewable on the network and has previously been working for years
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: The "VsTac" task failed unexpectedly.
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: System.IO.FileNotFoundException: Could not find file 'C:\Users\myuser\AppData\Local\Temp\appAsTgz.tgz'.
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: File name: 'C:\Users\myuser\AppData\Local\Temp\appAsTgz.tgz'
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.RemoteBuild.AppAsTgzStream(String changeTimeFile, JObject lastChangeTimesMap)
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.RemoteBuild.Build()
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.VsTac.BuildPlatform()
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.VisualStudio.MultiDeviceHybridApps.MdaBuildTasks.VsTac.Execute()
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets(256,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.41
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
Trying to build the iOS version of Cordova Mobile App

How do I resolve this Xamarin iOS Build Error in Visual Studio 2015, "Xamarin.Messaging.Exceptions.ClientDisconnectedException"?

After moving to a new Windows laptop, I am no longer able to build Xamarin iOS projects in Visual Studio 2015. With the same MacBook, I was able to build Xamarin iOS projects in Visual Studio 2015 on my old Windows laptop.
Due to customer requirements, I need to build a Xamarin iOS project with Xamarin.Forms.2.5.0.77107. I was able to reproduce this build error with the App1.iOS project in the sample Xamarin Cross Platform App generated by Visual Studio 2015, after installing Xamarin.Forms.2.5.0.77107 in the solution (the same issue also happens with Xamarin.Forms.2.3.4.247).
I am getting the following error when trying to build the App1.iOS project, while connected to the MacBook:
1>------ Rebuild All started: Project: App1.iOS, Configuration: Release iPhone ------
1> Connecting to Mac server 192.168.1.233...
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : The client build9304hhuan has been disconnected while waiting a post response to topic xvs/Build/4.6.0.299/copy-item/App1.iOS/80b5892%2FXamarin.Forms.Core.dll
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : The underlying client has been disconnected by the remote host
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : System.ObjectDisposedException: Cannot access a disposed object.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : Object name: 'System.Net.Mqtt.Client.Client'.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : at System.Net.Mqtt.Client.Client.d__32.MoveNext() in C:\Git\mqtt\src\Client\Client.cs:line 213
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : at Xamarin.Messaging.Client.TopicObservable1.<<Subscribe>b__5_0>d.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\TopicObservable.cs:line 32 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : The client build9304hhuan has been disconnected while waiting a post response to topic xvs/Build/4.6.0.299/copy-item/App1.iOS/80b5892%2FXamarin.Forms.Core.dll 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): warning : at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__232.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 172
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: The "UnpackLibraryResources" task failed unexpectedly.
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: System.AggregateException: One or more errors occurred. ---> Xamarin.Messaging.Exceptions.ClientDisconnectedException: The client build9304hhuan has been disconnected while waiting a post response to topic xvs/Build/4.6.0.299/copy-item/App1.iOS/80b5892%2FXamarin.Forms.Core.dll
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.d__232.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 194 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__272.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.d__331.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 325 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.BuildClient.<UploadItemAsync>d__22.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 128 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.BuildClient.<UploadItemAsync>d__21.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 115 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.TaskRunner.<CopyRequiredInputFilesAsync>d__7.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 159 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of inner exception stack trace --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.TaskRunner.Run(Task task) in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 45 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.MacDev.Tasks.UnpackLibraryResources.Execute() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.MacDev.Tasks\Tasks\UnpackLibraryResources.cs:line 14 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: ---> (Inner Exception #0) Xamarin.Messaging.Exceptions.ClientDisconnectedException: The client build9304hhuan has been disconnected while waiting a post response to topic xvs/Build/4.6.0.299/copy-item/App1.iOS/80b5892%2FXamarin.Forms.Core.dll 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__232.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 194
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.d__272.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown --- 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__331.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 325
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.BuildClient.d__22.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 128
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.BuildClient.d__21.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 115
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018: at Xamarin.VisualStudio.Build.TaskRunner.d__7.MoveNext() in C:\d\lanes\4985\b63523e2\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 159<---
1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(573,3): error MSB4018:
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I am using the following versions of software on my Windows laptop:
Microsoft Visual Studio Professional 2015
14.0.25431.01 Update 3
Microsoft .NET Framework
4.8.04084
Xamarin
4.6.0.299 (b63523e27)
Xamarin.iOS
10.12.0.20 (80b8487)
I am using the following versions of software on my MacBook:
Visual Studio Community 2017 for Mac
7.5.4 build 3
Xamarin.iOS
11.12.0.4
Xcode
8.3.3
I have confirmed that the Xamarin Mac Agent icon in Visual Studio 2015 shows as green, indicating an active connection to the MacBook. The Xamarin Mac Agent dialog shows the MacBook name next to a solid chain link, indicating an active connection. Also, I am able to click the Show iOS Simulator icon to successfully bring up the iOS simulator on the MacBook. The status of the connection to the MacBook remains the same before and after the failed build.
One difference between my new and old Windows laptops is that the new one has both Visual Studio 2015 and 2019 installed, due to the need to build with different versions of Xamarin.Forms. On the other hand, the old laptop did not have Visual Studio 2019 installed. Although Visual Studio 2019 recommends uninstalling Xamarin Components, I have not done so in case I may need it when using Visual Studio 2015.

Linux: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'

I have a sample Ocelot gateway service built using Dotnet Core Web API V3.1. I have build the solution in Windows machine using "dotnet clean and dotnet build" which works fine. I'm trying to do the same in Ubuntu 18.04 LTS machine through Jenkins which is causing the below issue.
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
1>Done Building Project "/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj" (Clean target(s)) -- FAILED.
Build FAILED.
"/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj" (Clean target) (1) ->
(ResolvePackageAssets target) ->
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: The "ResolvePackageAssets" task failed unexpectedly. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'. [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
/usr/share/dotnet/sdk/3.1.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/var/lib/jenkins/workspace/GatewaySample_SERVICE/GatewaySample/GatewaySample.csproj]
Kindly let me know what am I missing here?
Note: I have another linux machine where I have the same setup (but Dotnet Core V2.2) where I could able to build the API through Jenkins.
PS: Below is the content from .csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>GatewaySample_SERVICE</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Ocelot" Version="14.0.11" />
</ItemGroup>
</Project>
I had similar issue when moving from Windows environment to WSL environment.
I did not find any reference to the missing directory in project files thus I searched the fallback plugin folder references in the whole project directory hierarchy and found it only in bin/ and obj/ folders.
After deleting all the bin/ and obj/ folders from the projects I was able to build them under WSL.

TFS2015 build agent not working and returning unauthorized on log

My build agent isn't working correctly.
The build agent is running on the same machine as the TFS.
It does appear to connect successfully to the TFS server (it shows as ready on the server), but, when I start the build queue, it fails after 11 seconds with no log (on the TFS). Here's what is written on the log file:
16:40:29.150122 Sending trace output to log files: C:\TFSAgent\_diag
16:40:29.181325 VsoAgent.exe was run with the following command line:
"C:\TFSAgent\agent\vsoagent.exe" /runningAsService
16:40:29.259322 SettingsFileHelper.Load - settings[AutoUpdate]=True
16:40:29.259322 SettingsFileHelper.Load - settings[RootFolder]=C:\TFSAgent
16:40:29.259322 SettingsFileHelper.Load - settings[WorkFolder]=C:\TFSAgent\_work
16:40:29.259322 SettingsFileHelper.Load - settings[ServerUrl]=http://dm1sw801:8080/tfs
16:40:29.259322 SettingsFileHelper.Load - settings[AgentName]=Agent-DM1SW801
16:40:29.259322 SettingsFileHelper.Load - settings[PoolId]=1
16:40:29.259322 SettingsFileHelper.Load - settings[PoolName]=default
16:40:29.259322 SettingsFileHelper.Load - settings[AgentId]=1
16:40:29.259322 SettingsFileHelper.Load - settings[RunAsWindowsService]=True
16:40:29.259322 SettingsFileHelper.Load - settings[WindowsServiceName]=vsoagent.dm1sw801.Agent-DM1SW801
16:40:29.259322 SettingsFileHelper.Load - settings[WindowsServiceDisplayName]=VSO Agent (dm1sw801.Agent-DM1SW801)
16:40:29.274921 BaseLogger.LogStatus(scope.JobId = 00000000-0000-0000-0000-000000000000, scope.TimelineRecordId = 00000000-0000-0000-0000-000000000000, record.Name = Agent)
16:40:29.306124 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://dm1sw801:8080/tfs)
16:40:29.321723 Exe location hash = f804b79c89d4fd65abb6b5eb6a57ddd4
16:40:29.337265 Exe location hash = a0c37a6eb8e5c56516f0b3c48535f7ff
16:40:29.337265 Exe location hash = fb4c752b6401b13553aad779c01952c8
16:40:30.195342 SelfUpdater_Update(sharePath=, connection=True, runningAsService=True, workingFolder=C:\TFSAgent\_work)
16:40:30.195342 Using ServerDownloader(http://dm1sw801:8080/tfs)
16:40:30.195342 SelfUpdater.Update()
16:40:30.195342 ServerDownloader.UpdateNeeded()
16:40:30.195342 ServerDownloader.UpdateNeeded() - Getting agent version
16:40:30.304549 ServerDownloader.UpdateNeeded() - server agent version = 1.95.4
16:40:30.304549 ServerDownloader.UpdateNeeded() - agent version = 1.95.4
16:40:30.304549 Leaving ServerDownloader.UpdateNeeded - result = False
16:40:30.304549 Leaving SelfUpdater.Update()
16:40:30.304549 Leaving SelfUpdater_Update
16:40:30.320145 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Registering the agent 'Agent-DM1SW801 (default)' with the server http://dm1sw801:8080/tfs)
16:40:30.335746 Getting capabilities on this agent
16:40:30.335746 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Using SessionOwnerName 'DM1SW801')
16:40:30.335746 Exe location hash = f804b79c89d4fd65abb6b5eb6a57ddd4
16:40:30.335746 CentralLogger(name = Agent1-f804b79c89d4fd65abb6b5eb6a57ddd4)
16:40:30.335746 CentralLogger() - pipename = net.pipe://localhost/Agent1-f804b79c89d4fd65abb6b5eb6a57ddd4
16:40:30.351343 Unable to find the SCVMM admin console install path from registry
16:40:30.366940 CentralLogger.Listen() - opening host
16:40:30.382542 java_8=reg(HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.8\JavaHome) (C:\Program Files (x86)\Java\jre1.8.0_121)
16:40:30.382542 java=latestJre() (C:\Program Files (x86)\Java\jre1.8.0_121)
16:40:30.398141 CentralLogger.Listen() - waiting for shutdown
16:40:30.413740 Unable to find SQLPackage.exe from SQL Server path for version : 110.
16:40:30.413740 Unable to find SQLPackage.exe from SQL Server path for version : 110.
16:40:30.413740 Unable to find SQLPackage.exe from SQL Server path for version : 100.
16:40:30.413740 Unable to find SQL Install Root Path for version : 100.
16:40:30.413740 Unable to find SQLPackage.exe from SQL Server path for version : 90.
16:40:30.413740 Unable to find SQLPackage.exe from SQL Server path for version : 90.
16:40:30.413740 Unable to find the location of Dac Framework (SqlPackage.exe) from registry for SQL Server
16:40:30.429342 Visual Studio not found on machine
16:40:30.429342 Unable to find the location of Dac Framework (SqlPackage.exe) from registry
16:40:30.429342 DotNetFramework_2.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version) (C:\Windows\Microsoft.NET\Framework\v2.0.50727)
16:40:30.429342 DotNetFramework_3.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.0\Version) (C:\Windows\Microsoft.NET\Framework\v3.0)
16:40:30.429342 DotNetFramework_3.5=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.5\Version) (C:\Windows\Microsoft.NET\Framework\v3.5)
16:40:30.429342 DotNetFramework_4.5.3=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Release) (C:\Windows\Microsoft.NET\Framework\v4.0.30319\)
16:40:30.429342 DotNetFramework_2.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Version) (C:\Windows\Microsoft.NET\Framework64\v2.0.50727)
16:40:30.429342 DotNetFramework_3.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.0\Version) (C:\Windows\Microsoft.NET\Framework64\v3.0)
16:40:30.429342 DotNetFramework_3.5_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.5\Version) (C:\Windows\Microsoft.NET\Framework64\v3.5)
16:40:30.429342 DotNetFramework_4.5.3_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Client\Release) (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\)
16:40:30.429342 DotNetFramework=latestdotnet() (C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
16:40:30.444948 PROCESSOR_LEVEL=$env:PROCESSOR_LEVEL (6)
16:40:30.444948 PSModulePath=$env:PSModulePath (C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\)
16:40:30.444948 PROCESSOR_ARCHITECTURE=$env:PROCESSOR_ARCHITECTURE (AMD64)
16:40:30.444948 Path=$env:Path (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 Team Foundation Server 2013 Power Tools\Best Practices Analyzer\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\sonarqube\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Users\tfsservice\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\tfsservice\AppData\Roaming\npm\)
16:40:30.444948 VS140COMNTOOLS=$env:VS140COMNTOOLS (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\)
16:40:30.444948 PATHEXT=$env:PATHEXT (.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC)
16:40:30.444948 GO_SERVER_JAVA_HOME=$env:GO_SERVER_JAVA_HOME (C:\Program Files (x86)\Go Server\jre)
16:40:30.444948 VS100COMNTOOLS=$env:VS100COMNTOOLS (c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\)
16:40:30.444948 GO_SERVER_URL=$env:GO_SERVER_URL (https://127.0.0.1:8154/go)
16:40:30.444948 FP_NO_HOST_CHECK=$env:FP_NO_HOST_CHECK (NO)
16:40:30.444948 PROCESSOR_REVISION=$env:PROCESSOR_REVISION (1a05)
16:40:30.444948 BPADir=$env:BPADir (C:\Program Files (x86)\Microsoft Team Foundation Server 2013 Power Tools\Best Practices Analyzer\)
16:40:30.444948 VSSDK140Install=$env:VSSDK140Install (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\)
16:40:30.444948 OS=$env:OS (Windows_NT)
16:40:30.444948 PROCESSOR_IDENTIFIER=$env:PROCESSOR_IDENTIFIER (Intel64 Family 6 Model 26 Stepping 5, GenuineIntel)
16:40:30.444948 ComSpec=$env:ComSpec (C:\Windows\system32\cmd.exe)
16:40:30.444948 GO_AGENT_JAVA_HOME=$env:GO_AGENT_JAVA_HOME (C:\Program Files (x86)\Go Agent\jre)
16:40:30.444948 TEMP=$env:TEMP (C:\Windows\TEMP)
16:40:30.444948 CRUISE_SERVER_DIR=$env:CRUISE_SERVER_DIR (C:\Program Files (x86)\Go Server)
16:40:30.444948 NUMBER_OF_PROCESSORS=$env:NUMBER_OF_PROCESSORS (16)
16:40:30.444948 TMP=$env:TMP (C:\Windows\TEMP)
16:40:30.444948 USERNAME=$env:USERNAME (SYSTEM)
16:40:30.444948 GO_AGENT_DIR=$env:GO_AGENT_DIR (C:\Program Files (x86)\Go Agent)
16:40:30.444948 windir=$env:windir (C:\Windows)
16:40:30.444948 TEMP=$env:TEMP (C:\Users\tfsservice\AppData\Local\Temp)
16:40:30.444948 PATH=$env:PATH (C:\Users\tfsservice\AppData\Roaming\npm)
16:40:30.444948 TMP=$env:TMP (C:\Users\tfsservice\AppData\Local\Temp)
16:40:30.444948 WindowsKit_8.1=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots\KitsRoot81) (C:\Program Files (x86)\Windows Kits\8.1)
16:40:30.444948 WindowsKit_8.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots\KitsRoot) (C:\Program Files (x86)\Windows Kits\8.0)
16:40:30.444948 WindowsKit=maxWindowsKit() (C:\Program Files (x86)\Windows Kits\8.1)
16:40:30.444948 WindowsSdk_7.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\)
16:40:30.444948 WindowsSdk_7.0_NetFx35Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\)
16:40:30.444948 WindowsSdk_7.0_NetFx35Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\)
16:40:30.444948 WindowsSdk_7.0_NetFx40Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\x64\)
16:40:30.444948 WindowsSdk_7.0_NetFx40Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx40Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\)
16:40:30.444948 _NetFx35Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\x64\)
16:40:30.444948 _NetFx35Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx35Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\)
16:40:30.444948 WindowsSdk_8.1=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\)
16:40:30.444948 WindowsSdk_8.1_NetFx40Tools_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x64\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\)
16:40:30.444948 WindowsSdk_8.1_NetFx40Tools=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SDKs\Windows\v8.1A\WinSDK-NetFx40Tools-x86\InstallationFolder) (C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\)
16:40:30.444948 MSBuild_2.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\2.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework\v2.0.50727)
16:40:30.444948 MSBuild_3.5=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\3.5\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework\v3.5)
16:40:30.444948 MSBuild_4.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\4.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework\v4.0.30319)
16:40:30.444948 MSBuild_12.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\12.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\12.0\bin)
16:40:30.444948 MSBuild_14.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\14.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\14.0\bin)
16:40:30.444948 MSBuild=latestMSBuildVersion() (C:\Program Files (x86)\MSBuild\14.0\bin)
16:40:30.444948 MSBuild_2.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\2.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework64\v2.0.50727)
16:40:30.444948 MSBuild_3.5_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\3.5\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework64\v3.5)
16:40:30.444948 MSBuild_4.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\4.0\MSBuildToolsPath) (C:\Windows\Microsoft.NET\Framework64\v4.0.30319)
16:40:30.444948 MSBuild_12.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\12.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\12.0\bin\amd64)
16:40:30.444948 MSBuild_14.0_x64=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\MSBuild\ToolsVersions\14.0\MSBuildToolsPath) (C:\Program Files (x86)\MSBuild\14.0\bin\amd64)
16:40:30.444948 MSBuild_x64=latestMSBuildVersion(64) (C:\Program Files (x86)\MSBuild\14.0\bin\amd64)
16:40:30.460547 VisualStudio_10.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\ShellFolder) (c:\Program Files (x86)\Microsoft Visual Studio 10.0)
16:40:30.460547 VisualStudio_IDE_10.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\InstallDir) (c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE)
16:40:30.460547 VisualStudio_14.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\14.0\ShellFolder) (C:\Program Files (x86)\Microsoft Visual Studio 14.0)
16:40:30.460547 VisualStudio_IDE_14.0=reg(HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\14.0\InstallDir) (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)
16:40:30.460547 VSTest_14.0=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow
16:40:30.460547 VisualStudio=latestVsVersion() (C:\Program Files (x86)\Microsoft Visual Studio 14.0)
16:40:30.460547 VisualStudio_IDE=latestVsVersionIde() (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)
16:40:30.460547 VSTest=latestVsTestVersion() (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow)
16:40:30.460547 BaseLogger.RegisterWriter(name=serverWriter, writer, verbosity=Info
16:40:30.460547 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.ServerWriter
16:40:30.460547 BaseLogger.RegisterWriter(name=consoleWriter, writer, verbosity=Status
16:40:30.460547 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.ConsoleWriter
16:40:30.460547 BaseLogger.RegisterWriter(name=fileWriter, writer, verbosity=Diagnostic
16:40:30.460547 BaseLogger.RegisterWriter: writer type Microsoft.TeamFoundation.DistributedTask.Agent.Logger.FileWriter
16:40:30.476142 Exe location hash = bf80e00ab8fa62da0a09d71ef3c1a05f
16:40:30.491744 Exe location hash = f804b79c89d4fd65abb6b5eb6a57ddd4
16:40:30.491744 BaseLogger.LogConsoleMessage(scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://dm1sw801:8080/tfs)
16:40:30.491744 JobManager.LogConsoleMessage (scope.JobId = 00000000-0000-0000-0000-000000000000, message = Authenticating to the server http://dm1sw801:8080/tfs)
16:40:30.491744 JobManager.LogConsoleMessage - job not found in dictionary (scope.JobId = 00000000-0000-0000-0000-000000000000)
16:40:30.491744 Authenticating to the server http://dm1sw801:8080/tfs
16:40:30.647746 Created Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:40:30.663310 MessageQueueListener.DispatchAsync - starting loop
16:40:30.663310 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:40:30.678914 Waiting for Escape key on background thread: True
16:40:30.678914 Waiting for shutdown request event on background thread: True
16:41:20.693475 MessageQueueListener.DispatchAsync - message received.
16:41:20.693475 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:41:20.693475 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:42:10.723585 MessageQueueListener.DispatchAsync - message received.
16:42:10.723585 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:42:10.723585 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:43:00.722494 MessageQueueListener.DispatchAsync - message received.
16:43:00.722494 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:43:00.722494 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:43:50.736986 MessageQueueListener.DispatchAsync - message received.
16:43:50.736986 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:43:50.736986 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:44:40.751515 MessageQueueListener.DispatchAsync - message received.
16:44:40.751515 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:44:40.751515 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:45:30.781590 MessageQueueListener.DispatchAsync - message received.
16:45:30.781590 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:45:30.781590 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:46:20.796135 MessageQueueListener.DispatchAsync - message received.
16:46:20.796135 MessageQueueListener.DispatchAsync - No message retrieved from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:46:20.796135 MessageQueueListener.DispatchAsync - Getting message from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:47:06.629750 MessageQueueListener.DispatchAsync - message received.
16:47:06.629750 MessageQueueListener.DispatchAsync - Message 1 received from Session: 854733e6-35ef-43b6-bb85-67473f86646b
16:47:06.645380 WorkerRunner.RunJobOnWorker - enter
16:47:06.754556 WorkerRunner.RunJobOnWorker - starting the job
16:47:06.785753 BaseLogger.LogStatus(scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, scope.TimelineRecordId = fc30c29c-5e15-4bf2-b454-95a88d68dcd6, record.Name = Build)
16:47:06.785753 JobManager.LogStatus (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, record.Name = Build)
16:47:06.785753 JobManager.LogStatus - job not found in dictionary (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80)
16:47:06.785753 [fc30c29c-5e15-4bf2-b454-95a88d68dcd6][139e49a9-5864-41f0-8986-1829ac43fb80]Record: t=Job, n=Build, s=InProgress, st=07/02/2018 16:47:06, 0%, ft=, r=: Starting
16:47:06.785753 BaseLogger.LogConsoleMessage(scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = Agent version: 1.95.4)
16:47:06.785753 JobManager.LogConsoleMessage (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = Agent version: 1.95.4)
16:47:06.785753 JobManager.LogConsoleMessage - job not found in dictionary (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80)
16:47:06.785753 [fc30c29c-5e15-4bf2-b454-95a88d68dcd6][139e49a9-5864-41f0-8986-1829ac43fb80]Agent version: 1.95.4
16:47:06.785753 BaseLogger.LogConsoleMessage(scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = Starting job)
16:47:06.785753 JobManager.LogConsoleMessage (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = Starting job)
16:47:06.785753 JobManager.LogConsoleMessage - job not found in dictionary (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80)
16:47:06.785753 [fc30c29c-5e15-4bf2-b454-95a88d68dcd6][139e49a9-5864-41f0-8986-1829ac43fb80]Starting job
16:47:06.785753 JobManager.StartJob(job.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80)
16:47:06.785753 JobInfo.ctor
16:47:06.801359 JobInfo.ctor - leave
16:47:06.801359 JobManager.StartJob - calling JobWriter.StartJob
16:47:06.801359 JobWriter.StartJob - enter
16:47:06.801359 JobWriter.StartJob - (SKIPPING)first renew
16:47:07.004105 JobWriter.StartJob - start continual renewing
16:47:07.019704 AuthorizationType : OAuth
16:47:07.191367 ---------------------------------------------------------------------------
16:47:07.316163 ConsoleTimer_Callback - enter (30)
16:47:07.316163 ConsoleTimer_Callback - Inside Lock
16:47:07.316163 ConsoleTimer_Callback - processing job 139e49a9-5864-41f0-8986-1829ac43fb80
16:47:07.316163 ConsoleTimer_Callback - leave
16:47:07.331782 Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Unauthorized
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__79.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__76`1.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.Client.VssServerDataProvider.<ConnectAsync>d__39.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.TeamFoundation.DistributedTask.Agent.Common.ConnectionHelper.GetConnection(Uri serverUri, VssCredentials credentials)
16:47:07.331782 at Microsoft.TeamFoundation.DistributedTask.Agent.JobWriter.StartJob()
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__79.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__76`1.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.VisualStudio.Services.Client.VssServerDataProvider.<ConnectAsync>d__39.MoveNext()
16:47:07.331782 --- End of stack trace from previous location where exception was thrown ---
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
16:47:07.331782 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
16:47:07.331782 at Microsoft.TeamFoundation.DistributedTask.Agent.Common.ConnectionHelper.GetConnection(Uri serverUri, VssCredentials credentials)
16:47:07.331782 at Microsoft.TeamFoundation.DistributedTask.Agent.JobWriter.StartJob()
16:47:07.331782 ---------------------------------------------------------------------------
16:47:07.347366 Process logging event with context handler.
16:47:07.347366 BaseLogger.LogConsoleMessage(scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = ##[error]The Agent failed to start this job. Error: Unauthorized)
16:47:07.347366 JobManager.LogConsoleMessage (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, message = ##[error]The Agent failed to start this job. Error: Unauthorized)
16:47:07.347366 JobManager.LogConsoleMessage - message enqueued
16:47:07.362986 [fc30c29c-5e15-4bf2-b454-95a88d68dcd6][139e49a9-5864-41f0-8986-1829ac43fb80]##[error]The Agent failed to start this job. Error: Unauthorized
16:47:07.362986 JobManager.FinishJob(jobId = 139e49a9-5864-41f0-8986-1829ac43fb80, result = Failed)
*16:47:07.565774 StatusTimer_Callback - enter (25)
16:47:07.565774 StatusTimer_Callback - processing job 139e49a9-5864-41f0-8986-1829ac43fb80
16:47:07.565774 StatusTimer_Callback - leave
16:47:07.815391 LogFileTimer_Callback - enter (30)
16:47:07.815391 LogFileTimer_Callback - processing job 139e49a9-5864-41f0-8986-1829ac43fb80
16:47:07.815391 LogFileTimer_Callback - found 0 records for job 139e49a9-5864-41f0-8986-1829ac43fb80
16:47:07.815391 LogFileTimer_Callback - leave*
(This messages repeat about 50times)
16:47:17.659151 JobManager.LogStatus (scope.JobId = 139e49a9-5864-41f0-8986-1829ac43fb80, record.Name = )
16:47:17.659151 JobManager.LogStatus - message enqueued
16:47:17.659151 RenewJob.RenewAgentRequest - TaskCanceledException received.
16:47:17.737153 Calling JobManager.JobFinished event handlers
16:47:17.737153 JobInfo.Dispose
16:47:17.737153 JobInfo.Dispose - draining queues for job 139e49a9-5864-41f0-8986-1829ac43fb80
We are to believe the problem is that is returning Unauthorized at some point:
16:47:07.331782 Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Unauthorized
We are to believe there is something to do with the oAuth autorization:
16:47:07.019704 AuthorizationType : OAuth
I've been crawling the internet in search for an answer. Here are some I've tried:
https://github.com/Microsoft/vsts-agent/issues/792
TFS 2015 - On Site Build Failures
vNext build on TFS 2015 hangs on MSBuild step and produces no log files
Here's some information about the server and software running:
Agent Version: 1.95.4
TFS Version: 2015 Update 4 (14.114.26403.0)
Powershell Version: 3
Windows Server 2012 Standard 64-bit
What else can I try, to fix this?
UPDATE - 26/02/2018
Since this is urgent for the company, We've decided to switch to TFS2018. Everything is working fine now. There will be no way to validade an answer for this question after today. Thanks all.
Please try below things to narrow the issue:
Check if you have set the correct Notification URL in TFS
Administration Console, especially for the port number, by default
the port shoud be 8080. See this similar thread : The Agent
failed to start this job. Error: Not Found
Try to set the normal user account as the build agent service accoun.
Related document: Service accounts and dependencies in Team
Foundation Server
Restart below services:
The specific Agent service
Visual Studio Team Foundation Background Job Agent
Reconfig the build agent or deploy a new build agent to check it
again.

error MSB4018: The "LocPayloadAddProject" task failed unexpectedly

My new localization build setup failed on Localization.targets error MSB4018: The "LocPayloadAddProject" task failed unexpectedly. Can someone tell me what went wrong?
errors:
2017/01/26 11:31:04 AM 6>E:.BtCxCache\Localization.2.0.22.7\Localization.targets(780,5): error MSB4018: The "LocPayloadAddProject" task failed unexpectedly. [E:\bt\775626\repo\src\loc\Ux\Extensions\GalleryPackages\Compute\CreateAvailabilitySet.locbld\locbld.proj]
2017/01/26 11:31:04 AM E:.BtCxCache\Localization.2.0.22.7\Localization.targets(780,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\bt\775626\repo\out\retail-amd64-localization\CreateAvailabilitySet\lbaworking\default\CreateAvailabilitySet\locstudio.source'. [E:\bt\775626\repo\src\loc\Ux\Extensions\GalleryPackages\Compute\CreateAvailabilitySet.locbld\locbld.proj]
Got an answer from colleague and it solved the issue.
The LBA seeding didn't run correctly. There are no lba.config in each project folder under lba. i.e. "D:\Source\Repo\rdnext\AzureUX\IaaSExp\src\loc\Ux\Extensions\GalleryPackages\Compute\CreateAvailabilitySet.locbld\lba\cs\CreateAvailabilitySet\LBA.config"
Just set enable_locseeding=1 to make the file get copied correctly.

Resources