I'm building a DotNet Core console application. I have noticed that when I publish the application to the file system, the appsettings.json file is NOT included in the output files.
I've found that changing the copy option on the appsettings can make it appear, but it doesn't by default.
Shouldn't appsettings be included as a separate file in a console application so that you can configure the app on the fly?
appsettings.json
is an json file and nothing more. So it's OK to setupBuild action
andCopy to output directory
actions manually. – Ilya Chumakov.csproj
should have the following:<ItemGroup><Content Include="appsettings.json;appsettings.development.json"><CopyToPublishDirectory Condition="Exists(%(Identity))">PreserveNewest</CopyToPublishDirectory></Content></ItemGroup>
– Boggin