title: Find directory of files that are deployed with a VSTO
body: <p>I am developing an outlook addin with VSTO for Outlook 2016.</p>
  
  <p>In my deployment, I have a config file which is located in the same directory as the .dll and the .vsto files, aswell as all the other .dll's that are referenced in the addin.</p>
  
  <p>Is it possible at all, to programmatically get the directory, where the .vsto (and my config file) is located. For example the directory where the VSTO would be deployed to could be: "D:\MyPlugins\PluginX\pluginx.vsto"</p>
  
  <p>I tried various constants / methods that would usually work with a "normal" application, i.e:</p>
  
  <ul>
  <li>Environment.CurrentDirectory</li>
  <li>Directory.GetCurrentDirectory()</li>
  <li>Assembly.Location / Assembly.CodeBase</li>
  <li>System.Windows.Forms.Application.StartupPath</li>
  </ul>
  
  <p>and while most of them work in debug mode when I start the plugin with Visual Studio,
  obviously none of them work, because when you install a VSTO, your assembly gets copied to some generated directory.</p>