I have asp.net core 2 application. Based on documentation i have created .pubxml
file for my development environment. I am using web deployment (remote agent) to deploy the web package to target web server. On our build server where, jenkins is installed, i run the following command to build & deploy
D:\Jenkins\myproject\workspace\myapplication\Src\Api>dotnet publish Api.csproj /p:PublishProfile=development.pubxml
It builds and deploys the application successfully to target web server.
However my application has multiple appsettings
files specific to each environment. For example appsettings.json
, appsettings.development.json
, appsettings.staging.json
and appsettings.production.json
The deployment process deploys all the appsettings files to web server. (in this case to development web server)
How do i only include environment specific appsettings file? (in this case i want to deploy appsettings.json
, appsettings.development.json
but not other 2 files)