title: ASP.NET Core app does not read appsettings.json from output directory, but from the project one
body: <p>I've encountered a behaviour I don't understand when it comes to ASP.NET Core.</p>
  
  <p>While working with console applications in order to read a config file I copy it to an output directory in the following way:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;ItemGroup&gt;
        &lt;Content Include="mysettings.json"&gt;
          &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
        &lt;/Content&gt;
      &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>Otherwise I'd get <code>FileNotFoundException</code> if I use only a file name instead of full path.
  This way I can import files (e.g. another setting jsons) from other projects and it works fine.</p>
  
  <p>So far so good.</p>
  
  <p>However, in ASP.NET Core (I work on a Blazor Web Assembly project with ASP.NET Core backend to be more specific) when I run a server project the settings are not read from the output directory, but from the project one. Because of this I'm getting an error while trying to read a setting file from an another project in the solution, because the application looks for it in the project folder instead of the output folder.</p>
  
  <p>I'm not sure if it's relevant, but <code>Directory.GetCurrentDirectory()</code> shows <code>/BlazorApp/Server</code> while I would rather expect <code>/BlazorApp/Server/bin/Debug/netcoreapp3.1</code>.</p>
  
  <p>Is this an expected behaviour in ASP.NET Core? If so, how can I work with the files from another projects? I'd like to avoid having to update settings in multiple places manually.</p>
  
  <p>Thanks in advance</p>