Is it possible to add a class to a project in Visual Studio and have that class only built for the Debug configuration of the project? That is, it will not appear in the Rel
You can use #DEBUG (see Jon's answer) for classes.
For resources you can edit the MSBuild script file to include parts of the project conditionally based on the build mode selected.
The .csproj file is a XML MSBuild script, if you open it up in a text editor, you should find inside all of the parts of your project. If you can locate the parts you want to exclude from certain builds you can mark them with the Condition property. For example, to make a ItemGroup only be built for the Debug configuration you would do this:
You should be able to take a look though this and find the resources you want to exclude and add a similar Condition property to them, or to their parent group.
However, I would recommend that you use a separate assembly for test stuff and don't let it get mixed up with you main assemblies.