Is it possible to use or execute the Small Basic Compiler from a C# application? (The answer is yes) RRS feed

All replies

  • Well, you could use the SmallBasicCompiler.exe and SmallBasicLibrary.exe in your program maybe?
    • Edited by AirWaves Saturday, October 15, 2011 7:09 AM
    Saturday, October 15, 2011 7:09 AM
  • It is possible.


     sbBox.SaveFile(@"c:\users\" + Environment.UserName + @"\compile.sb");
                File.WriteAllText(@"c:\users\" + Environment.UserName + @"\compile.sb", sbBox.Text);
                ProcessStartInfo preview = new ProcessStartInfo(@"c:\users\" + Environment.UserName + @"\desktop\compiler\SmallBasicCompiler.exe");
                preview.Arguments = @"c:\users\" + Environment.UserName + @"\compile.sb";
                preview.WorkingDirectory = @"c:\users\" + Environment.UserName;


    As far as I can tell, the Compiler has dependencies on a few of the DLLs and possible XML files, but you just need to point it at a .SB file (in this example, preview.Arguments = @".sb_filepath";) and set the WorkingDirectory (where it puts the .DLL file, .EXE and .PDB) and start it and it should run fine.

    • Edited by LMCSHERRY Sunday, October 16, 2011 8:38 AM
    Sunday, October 16, 2011 8:36 AM