Click here to Skip to main content
13,410,621 members (32,993 online)
Click here to Skip to main content
Add your own
alternative version


14 bookmarked
Posted 1 Mar 2004

Bug Fix Tracking in C# Executable Files

, 1 Mar 2004
Rate this:
Please Sign up or sign in to vote.
Enter bug fix comments in C# source code and explore it from binary files.

Sample image


Bug Fixing is one of the major tasks in Software Development Lifecycle. At testing stage, responsibility of the software developer is not only to fix bugs, but also to do the proper documentation for the fixes. Companies will purchase any popular Defect Tracking Products available in the market to manage Entering, Fixing and Reviewing of the defects. The testers will record the defects found by them, into those Defect Tracking Systems and the developers will fix it and update the Defect Tracking Database with ample Fix details. There are lots of benefits through using a Defect Tracking System. One important factor is that we can implement certain workflow into the system. Also, the bugs can be listed in a specific-centralized place that can be accessed by any members in the project team, and the defects taken care of.

But, think about tracking a bug in a later stage? Consider a situation that, your team had developed an application, tested it, fixed defects reported, and finally released to the customer. What will you do in a later stage, when any of the bugs fixed were not in the right way or created some troubles. The history of the fixed bugs can be taken from the Defect Tracking System but it will give you difficulty in searching those issues in the Source Code or you have to take the history of the check-ins of the source codes from the Source Control System to trace or track the problems. This will make it more time consuming and may give more troubles if you are in a hurry to detach the issues.

How will it be useful for you if you are able to find the bug descriptions within the delivered binary files? I hope it will make your work easier to track the bug fixes you have done in the earlier period, in the delivered binary files.

A solution to track bugs in binary files

Here is a solution to track such bugs within the assembly files, of a project that is developed using C#. Normally for the bug fixes, we will add comments in the code regarding the fix done for that. Instead of giving comments or in addition to giving comments, you can exercise a specific methodology for bug fixes, to quick-track at a later stage in the binary files.

Microsoft .NET provides two functionalities in C# – Attributes and Reflection.

Attributes provide a powerful method to associate declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be queried at run time and used in any number of ways.

Reflection is runtime type discovery. That is, using reflection services you are able to load an assembly at runtime and find the classes, methods, properties etc. In addition to finding the types in the assembly, you can also dynamically invoke (late binding) those types.

If you are a beginner to C#, please have an idea about attributes and reflection in C#, before going through the applications provided with this article.

Overview of the applications

Download the application from the link provided.

The download will contain 3 projects:

  • Solution1 – BugFixAttribute: A Class Library application, which defines the BugFixAttribute. This solution contains a class BugFixAttribute, which is inherited from Attribute. The attribute contains members BugNumber, FixedBy, FixedDate, FixDescription. Using properties the values of these members are exposed.
  • Solution2 – TrackBugChanges: A Windows Application, to display the bug details (as attributes) available in a C# assembly file. In this application, you have to give an assembly name (for example, the executable file of Solution3). This application will explore the binary and will show all the bug fixes done on that assembly with class name and method name.
  • Solution3 – DoBugFix: A sample console application, that has bug fix attributes implemented in it. This application will give you an idea about how to use the BugFixAttribute.

In Solution2 and Solution3, the Class Library BugFixAttribute is referred.


Since it is a small application provided with this article, there is no need of explanation of code here. Required comments are added into the class files accordingly.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Program Manager
India India
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralA Brilliant Idea Pin
jabailo22-Jul-04 13:43
memberjabailo22-Jul-04 13:43 
GeneralRe: A Brilliant Idea Pin
rcardare12-Mar-05 8:40
memberrcardare12-Mar-05 8:40 
GeneralSorry, but no... Pin
Aurelian Georgescu2-Mar-04 20:51
memberAurelian Georgescu2-Mar-04 20:51 
GeneralRe: Sorry, but no... Pin
Simon Segal28-Mar-04 18:21
memberSimon Segal28-Mar-04 18:21 
GeneralImprovements Pin
Anonymous2-Mar-04 5:39
sussAnonymous2-Mar-04 5:39 
GeneralRe: Improvements Pin
Jayababu2-Mar-04 6:28
memberJayababu2-Mar-04 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180221.1 | Last Updated 2 Mar 2004
Article Copyright 2004 by Jayababu
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid