Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 3.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Documentation Index

Duplicates Finder (.NET)

This page contains reference information about the .NET Duplicates Finder Build Runner fields. The .NET Duplicates Finder Build Runner is intended for catching similar code fragments and providing a report on discovered repetitive blocks of C# and Visual Basic .NET code in Visual Studio 2003, 2005 and 2008 solutions.

Icon

TeamCity 3.0 supports C# up to version 2.0 and covers Visual Basic .NET up to version 8.0.

Option

Description

Build runner

Select Duplicates Finder (.NET) from the drop-down list.

Sources

Option

Description

Solution file path

Enter the path, relative to the Project Root Directory, to the Visual Studio 2003, 2005 or 2008 solution file.

Duplicate Searcher Settings

Option

Description

Fragments comparison

Use these options to define which elements of the source code should be discarded when searching for repetitive code fragments. Code fragments can be considered duplicated, if they are structurally similar, but contain different variables, fields, methods, types or literals. Refer to the samples below:

Normalize types to last subtype

If this option is checked, similar contents with different namespace specifications will be recognized as duplicates.

Discard literals

If this option is checked, similar lines of code with different literals will be recognized as duplicates.

Discard local variables

If this option is checked, similar code fragments with different local variable names will be recognized as duplicates.

Discard class fields name

If this option is checked, the similar code fragments with different field names will be recognized as duplicates.

Discard types

If this option is checked, similar content with different type names will be recognized as duplicates. That includes all possible type references (as shown below):

Ignore duplicates with complexity simpler than

Use this field to specify the lowest level of complexity of code blocks to be taken into consideration when detecting duplicates.

Skip files by mask

Enter files and wildcards to exclude files from the duplicates search (e.g. *_generated.cs).

Skip files with opening comment

Enter semicolon-separated keywords to exclude files that contain the keyword in a file's opening comments from the duplicates search.

Skip regions by message substring

Enter semicolon-separated keywords that exclude regions that contain the keyword in the message substring from the duplicates search. Entering "generated code", for example, will skip regions containing "Windows Form Designer generated code".

Debug

Check this option to include debug messages in the build log

2 Comments

  1.  Dear friends,

    i m working on VB.NET desktop project . my project having more then 50 forms . i have soo much junk code , unused variables and commeted code .

    i want to Discard all duplicates with complexity simpler code.

    i need to discard all my VB.Net (2005)  unused local variables ,  class and commeted line of code  / junk code.

    i read this article it is same as my requirement  . how can i download this and how can i remove my junk code.

    please help me

    regards

    Asma Qureshi

    software Eng

    UAE Dubai 

  2.  Dear friends,

    i m working on VB.NET desktop project . my project having more then 50 forms . i have soo much junk code , unused variables and commeted code .

    i want to Discard all duplicates with complexity simpler code.

    i need to discard all my VB.Net (2005)  unused local variables ,  class and commeted line of code  / junk code.

    i read this article it is same as my requirement  . how can i download this and how can i remove my junk code.

    please help me

    regards

    Asma Qureshi

    software Eng

    UAE Dubai