title: How do i get right the directory of my application?
body: <p>I've made a small console application (first publish in c#). but i cant use my resource files. I used textfiles can give it. It worked when i used the debug directory </p>
  
  <p>My goal is to create a directory like this:
  Applicationmap
  + application.exe
  + setup
  resource map
  + configurations.txt
  Logger
  + .</p>
  
  <p>Now if i try to reach the configuration file it sends me to:
  <code>C:\Users\&lt;username&gt; \AppData\Local\Apps\2.0\D01L7N51.9EW\R7HB7NAB.B7Y
  \sele..tion_0000000000000000_0001.0000_92af5262ce6f49d8</code></p>
  
  <p>While i'm expecting <code>C:/Users/&lt;username&gt;/ Documents/&lt;application&gt;/ + resources/config.txt</code>.</p>
  
  <p>I've tried </p>
  
  <pre><code>string dir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
  Console.WriteLine(dir);
  </code></pre>
  
  <p>&amp;&amp;   </p>
  
  <pre><code>Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
  </code></pre>
  
  <p>&amp;&amp;</p>
  
  <pre><code>Console.WriteLine(Directory.GetCurrentDirectory());
  </code></pre>
  
  <p>but i always end up at the appdata map. </p>