TFS Build vNext : Lot of itrace on codecoverage enable

220 Views Asked by At

On our build server, we have a space disk problem. After investigation, we found a lot of te.processhost.managed_xxx_xxx_xxx.itrace files in C:\Windows\Temp. It's take nearly 50Go.

There were created on a process building in TFS 2015 vNext, on the task Visual Studio Test but there are never delete automatically.

There were not created if we disable Codecoverage option (but we need this option of course).

How can we disable automaticaly creation of these files ? Or automaticaly delete these files in the process (without script) ? Any option ? Other idea ?

2

There are 2 best solutions below

5
Cece Dong - MSFT On

From TFS 2015 Update 3 (upgrade your TFS if your version is lower than this Update 3), there is a task named Delete files, you could add this task after Visual Studio Test task to delete the .itrace files.

0
TiltonJH On

I faced the same issue with build agents of version 2.122.1, "Visual Studio Test 1.*" and TFS 2017 Update 3.

I worked around it with a scheduled run of the following PowerShell script:

get-childitem -Path $env:SystemRoot\Temp -Filter *.itrace | where-object {$_.lastwritetime -lt (get-date).AddHours(-1)} | Foreach-Object { del $_.FullName }