Question: i have some files located in 

c:\MyApp\file.txt

and current executing assenbly in in debud filder

c:\MyApp\bin\Debug\

i want to get address of above "file.txt" at run time..

i tried this

Assembly.GetExecutingAssembly().Location

it gives me 
c:\MyApp\bin\Debug\MyApp.exe

how can i get address of "file.txt"

Answer: 
The "Debug" folder (and the "Release" folder) are the actual output from your project's build. If you haven't included `file.txt` in the project and marked it as "Copy to Output Directory", then it doesn't count as part of the build output, and your app shouldn't try to load it.

Basically, just set "Copy to Output Directory" to "Copy always" or "Copy if newer", and continue to use the path `"file.txt"`
Your executable folder path can be retrieved with :

```
AppDomain.CurrentDomain.BaseDirectory

```

In order to get what you want you could do the following

```
string fileTxtPath = AppDomain.CurrentDomain.BaseDirectory + "..\\file.txt";

```

Of course if you have a file that is related to your project then you should include it in the same folder as your executable. Right click it from visual studio and go to properties, then select in the option Copy to Output Directory the Copy Always option.