Hello I've created a WinForms application that I'm ready to implement on other computers (outside of mine). I've having problems running it elsewhere.
In the Program.cs
file I've got this to see what the problem is:
static void Main()
{
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new mainForm());
}
catch(SystemException ex)
{
MessageBox.Show("Error: ", ex.ToString());
}
}
Nothing it edited here besides the addition of the try/catch
. I know the problem is in this Program.cs
because I've got a series of message boxes are set to show in different stages of the MainForm_Load()
block. The application reaches none of them.
This probably sounds really vague, but I simply cannot get this application to work anywhere other than my laptop. Would it be one of the Usings
I've got? I can include those if needed.
Edit 2: As per Marko's suggestion, I copied all the external DLLs in the same root folder as the EXE I'm trying to run. The 3rd try-catch block is throwing the exception from the Program.cs
which is Application.Run(new mainForm());
and I traced this to the 32nd line of my mainForm.cs
. On this line I have my background worker:
private BackgroundWorker snBW = new BackgroundWorker();
are we any closer?