Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do you get another project directory in the same solution?

So I have a solution witch has two different projects(for example one of them is admin and one of them is presentation). it means I have two .exe files. My current project is for example presentation but I want the directory of the other one(admin)

 AppDomain.CurrentDomain.BaseDirectory

this code gives me the current project directory. one way is to back(./) and reach to the other project but it will be too much hard code. Is there any better ways to do it

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Generally solutions/projects are design time concepts, at run time these are simply independent exes that you can put wherever you want (like I assume u will be putting it in say c:\xxx\Admin\Project1.exe and c:\xxx\Presentation\Project2.exe). If so there are many possible ways to access these during runtime, some include:

  • Relative path: like you mentioned using ..\ syntax
  • Some form of config: app.config/other config file (local directory or appdata etc)/registry
  • Advanced modes: maybe IPC (works if both exe’s are running)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading