Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32065

C# reference program in different directory locations

$
0
0
I have a C# 2008/2010 application that is currently accessed as a dll file and  I would like to change the application so that the dll is accessed though as a reference. The code that calls the dll is a process and the code looks like the following:

Process theProcess = new Process();

theProcess.StartInfo = new ProcessStartInfo("filename.ext");

theProcess.StartInfo.Arguments = "args here"

theProcess.WaitForExit();

theProcess.Start();

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?

Viewing all articles
Browse latest Browse all 32065

Trending Articles