Or from a command console you can type net stop tcbuildagent and then type net start tcbuildagent.Ĭheck the TeamCity agent takes account of the environment variable.From a PowerShell console you can type Restart-Service TCBuildAgent.Once the environment variable named NDEPEND_TEAMCITY_HOME has been registered you need to restart the TeamCity build agent. To do so the recommendation is to register a system environment variable. It is important to make sure the environment variable is registered in a scope wheren the TeamCity build agent service will have access to.
The environment variable named NDEPEND_TEAMCITY_HOME must be registered with the value $NDependInstallDir$\Integration\TeamCity, where $NDependInstallDir$ is replaced with the NDepend install directory path.įor example if NDepend is installed in C:\NDepend the environment variable value must be C:\NDepend\Integration\TeamCity. To let the TeamCity agent knows where NDepend is installed on the machine, Register the environment variable named NDEPEND_TEAMCITY_HOME Once the TeamCity server is restarted you can check when creating a new Build Step, that the NDepend Build Step is available.
Once you've installed NDepend somewhere on the machine that hosts TeamCity, there are two manual steps to install the NDepend Team City plugin. Hence if you want custom options values, you need to save these values in the VisualNDependOptions.xml file that corresponds to the Windows user used to run .įirst notice that the TeamCity agent that runs NDepend must be a Windows machine, but the TeamCity server can run on any OS.
Notice that options like code query execution time-out are stored in the fileĬ:\Users\\AppData\Roaming\NDepend\VisualNDependOptions.xml which is available on a Windows user basis. Notice that the same Windows user must be used for activating thought VisualNDepend.exe, and for running the TeamCity NDepend plugin executable. If the machine is not connected to internet, a simple offline activation procedure will be proposed instead, and must be fulfilled in order to run the SonarQube NDepend plugin. Or /RegLic XYZ to register a seat of the Build-Machine license with key XYZ. To do so, once NDepend files are unzipped on the machine, just run from a command window /RegEval to start evaluation
To run the TeamCity NDepend plugin on a machine NDepend must be activated on it first.
A pro BuildMachine license seat is needed per machine that runs a TeamCity agent and that runs NDepend.Ī machine that runs the TeamCity server but doesn't run a TeamCity agent doesn't need a pro BuildMachine license seat.