Programming in C# — Question 103

You have an assembly named Assembly named Assembly1 that is written in C#.
Your company plans to sell Assembly =1 to customers. The customers might debug Assembly1.
You need to minimize the amount of information contained within the debug symbols that are shipped with Assembly1.
How should you create the debug symbols for Assembly1?

Answer options

Correct answer: C

Explanation

Option C is correct because it allows you to define the TRACE constant while disabling the DEBUG constant, thus reducing debug information. Option A is incorrect as pdbcopy.exe is used for copying PDB files, not for minimizing debug information. Option B is wrong since building with a Debug configuration typically includes more debug information. Option D is not the best choice because while Release configuration minimizes some debug information, it doesn't specifically address the debug symbols as effectively as Option C.