I am working through the Windows Applications with C# book by Amit Khalani
for the 70-316 exam, I am using VStudio version 7.1.3088. In the chapter on
Testing and Debugging there is an example where you are asked to do as
follows.....
"In Solution Explorer, select View All Files from the toolbar. Navigate to
the bin\debug folder. Right-click and Add New Item. Choose to create an XML
file and name the file StepByStep12_3.exe.config".
You then add some xml code to specify a trace switch.
The rest of the project is a basic Form with code that aims to demonstrate
various levels of output from the TraceSwitch class by changing the value of
the switch that was set in the XML file above. The following variable is
declared in the Form...
static TraceSwitch traceSwitch = new TraceSwitch("FactorialTrace", "Trace
the factorial application");
I managed to do add the xml file to the debug folder after figuring out that
you have to choose to select 'Include in the Project' for these normally
hidden folders to be available in the IDE. However when I Build the project
the new XML file is deleted and therefore the switch value is not picked up.
Has anyone come across this behaviour? Maybe there has been a change since
the book was written. I have downloaded the errata for the book from the Que
website and there is nothing about this chapter being wrong.