TFS 2015 Build Definition Failed But No Error - visual-studio

So I'm currently trying to play around with Team Foundation Server 2015 on premise. I got source control down and already setup my project collections and team project.
My next adventure is to try out continuous integration starting with Automated builds. I am however stuck in Build definition.
I already have an online build agent with the following specs:
Windows 7
Visual Studio 2013
Now when I que a build it fails after the following message
Waiting for console output from an agent...
I tried to download the log files but it gave me a blank folder. Do not know what next steps I should check and would really appreciate any help in this area.
Thanks

Generally this issue is caused by the agent failing to access resources for the build process.
Please first check if the agent is enabled in your Agent Pool, then try below things:
Check the connectivity
Check URL configuration of TFS as Danko mentioned above, make sure you deployed the build agent with the correct URL.
Try disable the Firewall on machine to check if the communicate issue caused the build hang.
If you are set the specific port or use proxy server for your TFS, then try to set the exception for the port on your firware. See this similar issue.
Make sure the account that the agent is run under is in the “Agent
Pool Service Account” role.
Make sure you deploy the Windows build agent by exactly following
this article.
Restart below services .
Visual Studio Team Foundation Background Job Agent
Your build agent service
Deploy a new build agent to check if that works.
Reference this similar thread for details:
2 Solutions collect form web for “vNext build on TFS 2015 hangs on MSBuild step and produces no log files”
Run Get-NetFirewallPortFilter in PowerShell (run PowerShell as
Administrator) on the TFS machine to get the port exception list.
Run the following PowerShell script to set exception for the specific
port:
$port = New-Object -ComObject HNetCfg.FWOpenPort
$port.Port = 9191
$port.Name = 'TFS CI Port:9191'
$port.Enabled = $true
$fwMgr = New-Object -ComObject HNetCfg.FwMgr
$profile = $fwMgr.LocalPolicy.CurrentProfile
$profile.GloballyOpenPorts.Add($port)

After installing the agent, it would have to appear Green, Enabled and in an IDLE state - in your WebAccess (Settings, either Build or Agent Queues directly, and verify the state there). I have experienced only once similar behavior, with accessing the resources and it was connected with how the TFS Server "Web Access URL" was set in the TFS Administration Console.You should make sure, that you are able to access your TFS from the build machine, using the exact same URL, that you have provided to your new build agent as well.

Related

TFS build runs with old code after checking in changes

Recently, I have been facing this issue where my TFS(2015 update 3) msbuild runs with old code even after checking in changes and saving changes locally in visual studio 2015 enterprise edition. I use build to run Automated UI test by running my machine as test agent.
I can see an agent workspace other than my workspace(don't know if anything to do with it).
Can anyone guide me to correct this issue, or anyway to move forward without facing this issue again?
Please try below items to narrow down the issue:
Check the source code via web portal, verify that the new changes are
really checked in.
Check the definition setting, try to set "Clean" to "True" in
Repository tab.
Also enable the "Clean" option in MSBuild step.
Try to create a new definition with the same settings, then try it
again.
Clean the caches for your TFS Application Tier and agent machine,
then try it again.
Reboot the TFS and agent machine
UPDATE:
Below screenshot for your reference, also make sure you mapped the source correctly. You can also try to delete workspace and entire source folder directly from your agent machine, eg C:\Agent\_work\2\s (You can get the info from build log)

Uninstall Build Agent from Teamcity (Windows)

I have been researching but can't seem to find anything on uninstalling a build agent from Teamcity. I have read that if I can stop the service there should be a 'Remove' button that appears under that agencies summary section. I have tried stopping the service through Server Manager, as well as, running the service.stop.bat under the <agent>\bin, but have had no success with the button appearing. Is there an easy way to remove the build agent from Teamcity?
Current Teamcity version: TeamCity Professional 10.0.3
Have you checked buildAgent/bin folder? There should be uninstall.bat file, which, I assume, should do just what you want.

Visual Studio Test using Test Agent

I have a situation : I have two servers (server A and server B) and my TFS making build of my application on server A and should deploy the results on server B. After that it should run UI tests remotely.
For doing that I use TFS 2015 and I added a few steps for my build definition (if you understand what i mean ))) ).
Firs step is "Visual Studio Build" step which is build my project. -> is working fine
The second step is "Publish Build Artifacts" for publishing the build results from server A to server B (maybe it is not best solution for publishing something between machines but is working for me. If you have some advice for that, I will be appreciate to hear it).-> is working fine
Third step is "Visual Studio Test Agent Deployment" which should deploy Test Agent on server B. When this step is runed it shows 'agentlocation' is not a valid path. Ensure that the account with which build agent is running has access to this share. And the all if fails on this step but root to file vstf_testagent.exe is acceseble by everyone (For sharing of this folder was set Everyone Read/Write).
Fourth step is "Visual Studio test using Test Agent" which should run my UI tests. I hope that this step can run my UI tests.
on server A I installed Test Controller and on server B I installed Test Agent and gave him name of Test Controller. On server A I use Visual Studio 2015 but on server B I use Visual Studio 2013.
Please help me to understand problem with third step. What can it be and how to resolve it?
And can step fourth run my UI tests?
Thanks a lot for any help!
The field of "Test Agent Location" is optionally, which is used to supply the path to vstf_testagent.exe from network or local location. If no path is provided, it will be downloaded from network. You can leave this field blank and let it download from network, maybe you can deploy a test agent successfully.

TF30063: You are not authorized to access <VSO collection> - Visual Studio Online

While trying to configure Build Controller/Test Controller and Build Agent/Test Agent there is a problem to connect to VSO.
It is however possible to connect to VSO via Web Portal without any issue. The problem occurs while configuring Build and Test environment. Notice that the permission is not the issue !
The problem seems to be resolved after establishing the connection via Test Explorer.
After establishing the connection in Team Explorer 2013. I was able to choose the VSO collection in the build/test service configuration without experiancing the issue.
In conclusion before you configure the build/test tools install Test Explorer and establish there the connection to your VSO team collection and later in the build/test tools.
http://www.microsoft.com/en-us/download/details.aspx?id=40776

TFS2013: An error occurred while copying diagnostic activity logs to the drop location. Details: Internal Server Error

I've read other articles similar to this such as this one but I have been unable to resolve this on my TFS 2013 config. I upgraded TFS 2012 Update 3 to TFS 2013 then moved it to another server as I needed a setup with SQL Server 2012. I didn't have any issues with TFS 2012 but after upgrading to TFS 2013 I'm getting an error in the build system. The builds complete as "Partially Succeeded" as the actual builds complete but I get the following error:
An error occurred while copying diagnostic activity logs to the drop location. Details: Internal Server Error
There is a similar inquiry on Microsoft Connect here but I don't know how the OP resolved it.
I've checked permissions, added full control permissions to the user that the build service runs under, NETWORK SERVICE, etc. I added this permission to various areas, I'm not sure exactly which one needs it i.e. the build folder, the drop folder, the TFS application tier area, or what. I don't see any helpful information in the Windows Event Logs or TFS debug log. I'm out of ideas on how to resolve this.
Any help would be appreciated. And this TFS setup does not use Active Directory as I'm the sole user/developer in this config and small biz.
Thank you
EDIT
I installed SQL 2012, Visual Studio 2013, TFS 2013 to a new server, added one solution ran a build and the exact same errors occurred. I'll have to open a case on Microsoft Connect.
if this is a share folder, configure the share in the ComputerSettings. in the "Shared Folder" configure the Share in the Security Tab and the Publishment Options
I never found a fix to this issue, however, after moving to a new server and installing SQL 2014 and TFS 2013 Update 2 and following this guide http://msdn.microsoft.com/en-us/library/ms404869.aspx all is working perfect.

Resources