If your goal is C# or VB.NET development without a heavy installation, consider these natively portable options: SharpDevelop (Portable)
To write text to a file using code, you can use the StreamWriter class: visual studio 2008 portable
Even after installing to the USB drive, some components remain on the system drive. You need to manually copy them: If your goal is C# or VB