Skip to main content

Configure on a Local Team Foundation Server

  • 3 minutes to read

#Add the CodeRush Analyze Task

  1. Select your project in the Team Foundation Server (TFS) Projects page and click the Build and Release link.

    ClickBuildAndRelease

  2. Click the ellipsis button in your build definition and select Edit... in the invoked menu.

    EditBuildDefinition

  3. Select the Build solution task and click plus sign (+) on Phase 1 to add a new task after the Build solution task in the build definition.

    AddTaskToPhase

  4. Add the CodeRush Analyze task after the Build solution task in your build definition.

    Add Build Task

#Configure the CodeRush Analyze Task

You can specify the following options:

#Solution or Project Option

This option allows you to specify a relative path to the repository root of the project or solution to run. Wildcards can be used but the result must point to a single file.

LeaveDebug

#Configuration Option

Leave the CodeRush Analyze task's configuration set to "Debug" (or set it to another configuration that can be used to run unit tests).

Specify Task Configuration

#Send Logs Option

Enable the "Help DevExpress improve this product by sharing usage data anonymously" option if you want CodeRush Server to collect logs. This helps us improve this product. No personal information is collected (see Privacy Policy).

Improve

#Exclude Tests in Categories Option

Set the Exclude tests in categories option to "TODO | Exclude". This option lets you ignore tests by category. Excluded tests are marked as ignored on the Tests view page.

Exclude

#Exclude Projects and Assemblies from Analysis

Use the RunSettings file location option to specify a relative path to a .runsettings file. Wildcards may be used. CodeRush Server excludes projects and functions from code coverage analysis if you add them to the corresponding Exclude section of the .runsettings file.

Use the Assemblies excluded from analysis option to specify relative paths to assemblies, or assembly names, which you want to exclude from testing and analysis. Wildcards may be used.

ExcludeTests

#Build Configuration Option

Assign the "debug" value to the BuildConfiguration option on the Variables tab.

Specify Build Configuration

#Save Build Definition and Build the Solution

  1. Select Save & queue to invoke the save this dialog.

    Save1

  2. Click Save & queue in the dialog to save the build definition and build the solution.

    Save2

  3. You see a link to the new build at the top of the Build and Release page. Click this link and wait for the build to complete.

    Build

#View Analysis Results

Select CodeRush -> Dashboard to view analysis results on Dashboard, Tests, Coverage, and Diagnostics views after the solution is built.

Select