Cannot locate required assembly VMS.TPS.Common.Model.dll

May 28, 2014 at 4:06 AM
Edited May 28, 2014 at 4:12 AM
Hi there,

I am new to ESAPI. As a learning excercise, I am writing small stand alone app (winform) to login and out of the Eclipse. When I run it on my development machine and try to login which does not have Eclipse/ARIA access I get an error "Cannot locate required assembly VMS.TPS.Common.Model.dll" along with the exception that I throw in my code. However, when I move the application to my system with my Eclipse/ARIA access, it works fine.

Any thoughts? How can I fix it.

The code is:
......
......
using VMS.TPS.Common.Model.API;
using VMS.TPS.Common.Model.Types;

namespace ESAPI_winforms_learning
{
public partial class Form1 : Form
{
    VMS.TPS.Common.Model.API.Application app;
    string user;

    public Form1()
    {
        InitializeComponent();
    }

    private void LoginButton_Click(object sender, EventArgs e)
    {
        // Login

        try
        {
            //Console.WriteLine("Logging in...");
            app = VMS.TPS.Common.Model.API.Application.CreateApplication(null, null);
            Console.WriteLine("Running script...");
            // Enable Buttons
            user = this.UserIdTextBox.Text = app.CurrentUser.Id;
            LoadPatientButton.Enabled = true;
            LoadPatientButton.ForeColor = Color.Red;
            MessageBox.Show("Login Successfull");
            this.LoginButton.Visible = false;
        }
        catch (Exception exception)
        {
            MessageBox.Show("Exception was thrown:" + exception.Message);
        }
    }

    private void LogoutButton_Click(object sender, EventArgs e)
    {
        // Dispose app instance & close the form
        app.Dispose();
        MessageBox.Show("Logout OK");
        this.Close();
    }

}
}
Coordinator
May 28, 2014 at 4:36 PM
The Eclipse Scripting API runs on top of Eclipse, so standalone executables only run on a computer that has Eclipse installed.
May 28, 2014 at 11:46 PM
Thanks, I found it strange because am not using VMS.TPS.Common.Model.dll.