My Build Server has been running just fine for a couple months and then this week we started getting this problem (see below).
It's almost certainly a permission problem, but no one in IT will admit to having changed a permission somewhere.
Also, it's trying to publish a log file to a location that doesn't exist!
to '#/416/logs/msbuild/agent-2'
If I knew where this location was, I would happily fix it or turn this specific publish off. All the other logs are present and accessible (obviously I'm able to view the log of these errors).
using Visual Studio 2013 & TFS2013.
This is the same issue, but changing the drop folders didn't fix it:
TFS Error publishing log files to #/198/logs/msbuild/agent-2
Other Errors and Warnings
3 error(s), 0 warning(s)
Exception Message: TF270016: An error occurred publishing log files from
'C:\Builds\2\AppName\AppName\src\AppName\AppName.log'
to '#/416/logs/msbuild/agent-2'. Details: An error occurred while
sending the request. (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: An error occurred while sending the request. (type
HttpRequestException) 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)
Inner Exception Details:
Exception Message: Unable to connect to the remote server (type
WebException)Exception Stack Trace: at
System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult
ar)
Inner Exception Details:
Exception Message: No connection could be made because the target
machine actively refused it [::1]:8080 (type SocketException)
Exception Stack Trace: at
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at
System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,
Socket s4, Socket s6, Socket& socket, IPAddress& address,
ConnectSocketState state, IAsyncResult asyncResult, Exception&
exception)
An error occurred while copying diagnostic activity logs
to the drop location. Details: An error occurred while sending the
request.
An error occurred while copying diagnostic activity logs to
the drop location. Details: An error occurred while sending the
request.
Update 12/29/2015
I've been able to confirm with IT that our main TFS instance was updated to 2013 Update 5.
Our build server is running TFS 2013 Update 4. My next priority will be getting the build server updated.
You can try to create a new build agent to see whether the issue persists.
The issue had nothing to do with TFS.
On the build server machine, we had a copy of Visual Studio installed (necessary for MSBuild and MSTest). The license we used had expired, and as a result Visual Studio installed in trial mode.
I don't know why this mattered, but reinstalling Visual Studio using a valid license fixed the issue.
Related
I have a project that I used to deploy as a single executable, but I am no longer able to as the Publish process throws while trying to resolve the nugest. The project builds fine during the publish process and it also runs fine from visual studio.
My publish results:
========== Build: 7 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
I get a popup with this error:
08/12/2021 21:35:26
System.AggregateException: One or more errors occurred. ---> Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details. <---
Microsoft.WebTools.Shared.Exceptions.WebToolsException: Publish has encountered an error. We were unable to determine the cause of the error. Check the output log for more details.
===================
And in the Error view I get this:
Severity Code Description Project File Line Suppression State
Error MSB4018 The "ResolvePackageDependencies" task failed unexpectedly.
System.ArgumentException: Invalid framework version '3.1/win-x64'.
at NuGet.Frameworks.NuGetFramework.ParseFrameworkNameParts(IFrameworkNameProvider mappings, String[] parts, String& framework, Version& version, String& profile)
at NuGet.Frameworks.NuGetFramework.ParseFrameworkName(String frameworkName, IFrameworkNameProvider mappings)
at NuGet.Frameworks.NuGetFramework.Parse(String folderName, IFrameworkNameProvider mappings)
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.<GetPackageAndFileDefinitions>b__48_5(String tg)
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value)
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.<>c__DisplayClass48_1.<GetPackageAndFileDefinitions>b__3(IAssetsLogMessage log)
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.<GetPackageAndFileDefinitions>g__GetPackageDiagnosticLevel|48_0(LockFileLibrary package)
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.GetPackageAndFileDefinitions()
at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() TextureEditor C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets 195
This is the configuration I am trying to build with:
If interested, the project can be found here: https://github.com/olekristianhomelien/TheAssetEditor
Any ideas what is going wrong?
I am getting this error on visual studio online servers. I would like to see why it failed ? How do I see what is installed on visual studio build agent ?
Error
2017-06-20T15:11:00.0341044Z ##[error] System.Exception : Non
matching response code: InternalServerError - {"message":"An error has
occurred.","exceptionMessage":"Could not load type
'Microsoft.ServiceFabric.Data.Collections.IReliableConcurrentQueue`1'
from assembly 'Microsoft.ServiceFabric.Data.Interfaces,
Version=5.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.","exceptionType":"System.TypeLoadException","stackTrace":"
at Infrastructure.ExceptionHandling.ExceptionHelper.ThrowIfUnhandled()
in
d:\a\1\s\Infrastructure\Infrastructure.ExceptionHandling\ExceptionHelper.cs:line
45\r\n at
xxxx.WebApi.Controllers.yyyyTypesController.d__8.MoveNext()
in
d:\a\1\s\Orchestration\xxxxGenius\xxxxx.WebApi\Controllers\yyyyTypesController.cs:line
142\r\n--- End of stack trace from previous location where exception
was thrown ---\r\n at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)\r\n at
Where should I click ?
The build is telling you why it failed: It can't find the assembly Microsoft.ServiceFabric.Data.Interfaces.
The software loaded on the hosted agent is well documented. If the hosted agent doesn't have something you need, and you can't install it as a NuGet/NPM package, then you'll have to set up your own agent that has the required software on it.
I'm trying to configure release management server to deploy to out test server when a specific build configuration on TFS succeeds. Now I have a build definition which runs fine, I use the build process template 'ReleaseTfvcTemplate.12.xaml'.
The 'Release Template' in Release Management Server (RMS) is set to trigger on build.
Now when I set the 'Release Build' property in the Release category to 'False', the build runs fine. Then when I go the Release Management Client and create a release, everything goes fine and my project (a WebAPI) is succesfully published to our testserver.
As soon as I set the 'Release build' property to true (in the build definition) and queue a new build, the build fails.
I receive the following error :
Exception Message: The directory name is invalid (type Win32Exception)
Exception Stack Trace: Server stack trace: at
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo
startInfo) at
Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start()
at
Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.InvokeProcessInternal.RunCommand(AsyncState
state) at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Object[]& outArgs) at
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage
msg, IMessageSink replySink)
Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message
reqMsg, Boolean bProxyCase) at
System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed,
MessageData& msgData) at System.Func2.EndInvoke(IAsyncResult
result) at
System.Activities.AsyncCodeActivity1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext
context, IAsyncResult result) at
System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor
executor, BookmarkManager bookmarkManager)
The build template includes a xcopy step which may cause the "The directory name is invalid", but I don't understand why the process works manually, but not automated.
Any suggestions in the right direction are very welcome!
Make sure you have a RM Client install on the build agent machine.
Sometimes the release template can 'lose' its connection in to the build definition. To check this open the release template and use the Properties link to re-establish the connection to the build definition. In case it helps I have a soup to nuts blog post series on configuring all this - index page here.
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.
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" />
I have a sample test project given to developers on my project team to learn how to use automated tests. When I run the set of unit tests that I have, they all pass but I receive the following Warning and Error:
Warning: conflict during test run deployment: deployment item '[...]\WebAppMvc4.dll' directly or indirectly referenced by the test container '[...]\webappmvc4.tests.dll' cannot be deployed to 'WebAppMvc4.dll' because otherwise the file '[...]\WebAppMvc4.dll' would overwrite deployment item '[...]\WebAppMvc4.dll' directly or indirectly referenced by '[...]\webappmvc4.tests.dll'
Error: Cannot initialize the ASP.NET project 'WebAppMvc4'.
Exception was thrown: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:12903/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error.
This is very similar to the problem found here: Test run errors with MSTest in VS2010
However, the resolution to this problem had to do with turning off the Sign The Assembly checkbox in the project properties. Signing is not turned on for this project, and I have not been able to determine the reason for the Warning/Error.
Here is the information from Event Viewer for the Warning:
Event code: 3008
Event message: A configuration error has occurred.
Event time: 6/27/2012 9:40:51 AM
Event time (UTC): 6/27/2012 2:40:51 PM
Event ID: a9b4d9d93e334acbbde6184527b4cd81
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Process information:
Process ID: 4128
Process name: WebDev.WebServer40.EXE
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
at System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
at System.Web.Compilation.BuildManager.CallPreStartInitMethods()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Common' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
Request information:
Request URL:
http://localhost:12903/VSEnterpriseHelper.axd
And here is the info for the Error:
(QTAgent32.exe, PID 9392, Thread 7) CoveragePlugIn.InitAspNet threw in calling WorkerProcessIdentity or WorkerProcessImpersonatedIdentity for 'WebAppMvc4':
Microsoft.VisualStudio.Enterprise.Common.AspNetHelperException: The web site could not be configured correctly; getting ASP.NET process information failed.
Requesting 'http://localhost:12903/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.VisualStudio.Enterprise.Common.BaseHelper.GetWorkerProcessInfo()
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Enterprise.Common.BaseHelper.GetWorkerProcessInfo()
at Microsoft.VisualStudio.TestTools.CodeCoverage.CoveragePlugIn.InitAspNet(TestRun testRun)