I have a C# 2008/2010 application that is currently accessed as a exe file and I would like to change the application so that the exe is accessed though as a reference. The code that calls the dll is a process and the code looks like the following:
strConsoleAppLocation = ConfigurationManager.AppSettings["dll_location"];
string Process_Arguments = null;
Process RPT_Process = new Process();
RPT_Process.StartInfo.FileName = strConsoleAppLocation;
Process_Arguments = " 7 " + strCUSTID + " 1";
RPT_Process.StartInfo.Arguments = Process_Arguments;
RPT_Process.Start();
RPT_Process.WaitForExit();
RPT_Process.Dispose();
The problem is the dll is currently placed in various locations like unit test area, client acceptance testing, system testing, and then into production by the 5 applications that call it. The application currently obtains the various locations based upon values in the app.config file. If I add this dll has a reference to the programs that call it, how will I tell those calling programs where to obtain the 'correct' directory location? Would I use the app.config file?
Can you show me code and/or explain to me how to solve this issue?
strConsoleAppLocation = ConfigurationManager.AppSettings["dll_location"];
string Process_Arguments = null;
Process RPT_Process = new Process();
RPT_Process.StartInfo.FileName = strConsoleAppLocation;
Process_Arguments = " 7 " + strCUSTID + " 1";
RPT_Process.StartInfo.Arguments = Process_Arguments;
RPT_Process.Start();
RPT_Process.WaitForExit();
RPT_Process.Dispose();
The problem is the dll is currently placed in various locations like unit test area, client acceptance testing, system testing, and then into production by the 5 applications that call it. The application currently obtains the various locations based upon values in the app.config file. If I add this dll has a reference to the programs that call it, how will I tell those calling programs where to obtain the 'correct' directory location? Would I use the app.config file?
Can you show me code and/or explain to me how to solve this issue?
Last edited: