I use this simple routine to create an error.log for Windows applications. Just catch the exception and send it to this routine. private void WriteError(string Exception1) { StreamWriter StreamWriter1 = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory