Compiling an .exe file on a non-Eclipse workstation

Sep 22, 2015 at 2:09 PM
I want to write a simple standalone program that counts all of the IMRT plans that have been treatment approved during the previous month. TheEclipse Scripting Wizard produces the following code:
namespace IMRT_Numbers
{
  class Program
  {
    [STAThread]
    static void Main(string[] args)
    {
      try
      {
        using (Application app = Application.CreateApplication(null, null))
        {
          Execute(app);
        }
      }
      catch (Exception e)
      {
        Console.Error.WriteLine(e.ToString());
      }
    }
    static void Execute(Application app)
    {
        // Code to count IMRT plans goes here
    }
  }
}
But when compiled and executed (from an Eclipse workstation) I get the following error:

System.IO.FileNotFoundException: Could not load file or assembly VMS.TPS.Common.Model.Interface or one of its dependencies.

I suspect that the problem arises because visual studio isn't installed on an Eclipse workstation so the .exe file has been compiled on a non-Eclipse workstation and copied across. However, this approach seems to work fine with single file plugins as long as the following references are included:

VMS.TPS.Common.Model.API
and VMS.TPS.Common.Model.Types

Is it possible to create standalone .exe files using the technique of compiling on a non-Eclipse workstation and copying the file across to an Eclipse workstation?

(Or have I missed the point altogether and the error is caused by something else?)

Thanks.
Coordinator
Sep 22, 2015 at 3:17 PM
It is possible to create standalone executable files using the technique of compiling on a workstation that does not have Eclipse and copying the files across to an Eclipse workstation. If you don't have the paths exactly the same on the build system and the run system you might run into the problem you report.

In Eclipse v13.6.30 and later (13.6 MR 0.5 and v13.6 MR 1) we have separated Eclipse Scripting API package from the main installer so you can do exactly this without the trouble of manually copying DLLs. If you need the Eclipse Scripting API installer for development purposes in v13.6.30 and later (includes Script Wizard, Online Help, and binaries needed for compilation), please send an email to eclipsedeveloper@varian.com with your name and your institution and once we verify you are an Eclipse user we can send you the package. Note that this package is for developer use only and Varian service must install it on other systems. See the latest reference guide on MyVarian for more details, "Chapter 4 Installing the Eclipse Scripting API in a Developer Environment".