So you setup TFS Aggregator and it just sits there…. doing nothing…
Well, this is a check list of things to double check.
:\Program Files\Microsoft Team Foundation Server {version}\Application Tier\Web Services\bin\Plugins
)TFSAggregator2.ServerPlugin.policies
.tfssecurity /collection:http://server:8080/tfs/DefaultCollection /g+ "Project Collection administrators" "LOCAL SERVICE"
if your service account is either LocalService, NetworkService or any other Windows Well-known identity, since they are no longer shown in the permission UI.Also if you are having issues we recommend debugging your Policies file using TFSAggregator2.ConsoleApp.exe
and trying that out.
The TFSAggregator2.ConsoleApp.exe
command line tool is extremely useful to test and validate your policy files before applying to TFS.
Sample invocation
TFSAggregator2.ConsoleApp.exe run --logLevel=diagnostic --policyFile=samples\TFSAggregator2.ServerPlugin.policies --teamProjectCollectionUrl=http://localhost:8080/tfs/DefaultCollection --teamProjectName=TfsAggregatorTest1 --workItemId=42
See Console Application for more information on using the command line tool.
You can also enable Logging. There are two parts to enable logging.
The first is that you have to set a level
attribute to the logging
element in your TFSAggregator2.ServerPlugin.policies
file.
Use a value like Verbose
or Diagnostic
.
<?xml version="1.0" encoding="utf-8"?>
<AggregatorConfiguration>
<runtime>
<logging level="Diagnostic"/>
</runtime>
Then you need to download DebugView from Microsoft’s SysInternals site.
DebugView is a Trace Listener and will capture the trace messages from TFSAggregator.
You have to run DebugView on all TFS Application Tier machines.
We would recommend adding the *TFSAggregator*
filter to DebugView so that you only see the TFSAggregator traces.
Make sure to enable the Capture Global Win32 option. Download DebugView at http://technet.microsoft.com/en-us/sysinternals/bb896647.
Note that you can use the logger
object in your rules to trace execution and values.
TFS Aggregator log messages go to:
- Debug output (appers in the Output window of a debugger)
- Application EventLog (TFS Aggregator source) when message level is Warning
or Critical
- Trace listeners
User messages – i.e. logger.Log
calls in Rules – use a specific Trace source: TfsAggregator.User
.
Now, you can send traces to a file by adding to TFS web.config
a system.diagnostics
section similar to the this:
<system.diagnostics>
<sources>
<source name="TfsAggregator.ServerPlugin" switchValue="All">
<listeners>
<remove name="Default" />
<add name="filelog" />
</listeners>
</source>
<source name="TfsAggregator.User" switchValue="All">
<listeners>
<remove name="Default" />
<add name="filelog" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="filelog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
BaseFileName="TfsAggregator.log"
DiskSpaceExhaustedBehavior="ThrowException"
Location="Custom"
CustomLocation = "C:\Temp"
MaxFileSize="81920000"
LogFileCreationSchedule="Daily"/>
</sharedListeners>
<trace autoflush="true"/>
</system.diagnostics>
TFS web.config is located in C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\Web Services\web.config
or similar.
If you check all the above items and it still does not work , create a new Issue on GitHub. Please add any useful information like:
TFSAggregator2.ServerPlugin.policies
file (e.g. save it on https://gist.github.com/ and copy the link in the Issue)If you built the assemblies yourselves, they have a fixed 2.0.0.0
version. Please report, the source code version (Tag or commit SHA) used to build your binaries.
Remove any sensitive information before posting!
Consider that this is a voluntary work and we have families and daily jobs, which means: no guarantee of fast response. Timezone differences may also impact on response times.