StreamWriter is available for NET 1.1. and for the Compact framework. Just open the file and apply the ToString to your StringBuilder:
StringBuilder sb = new StringBuilder();
sb.Append(......);
StreamWriter sw = new StreamWriter("\\hereIAm.txt", true);
sw.Write(sb.ToString());
sw.Close();
Also, note that you say that you want to append debug messages to the file (like a log). In this case, the correct constructor for StreamWriter is the one that accepts an append
boolean flag. If true then it tries to append to an existing file or create a new one if it doesn't exists.