I have a couple of confusions:
I published an ASP.NET Core project and I do not see launchsettings.json in bin\Release\PublishOutput. If I use Octopus, how do I configure attributes based on server type?
Is it possible to move launchsettings.json to the root folder instead of under properties?
If I want to use only one json like appsettings.json, can I merge both in the root folder?
Can web.config be used instead of launchsettings.json, and how?
You can directly edit the launchSettings. json file in Visual Studio for Mac, or you can use project options to edit it. To get to the project options, right-click your project and select Options. Select Run > Configurations > Default.
The launchSettings. json file is used to store the configuration information, which describes how to start the ASP.NET Core application, using Visual Studio. The file is used only during the development of the application using Visual Studio. It contains only those settings that required to run the application.
The most important point that you need to keep in mind is this launchSettings. json file is only used within the local development machine. That means this file is not required when we publishing our asp.net core application to the production server.
Visual studio maintains a file called launchSettings. json in a folder called Properties. This file contains various options for launching your app. launchSettings is used only by visual studio - it is never deployed to a production server.
Answers to your questions:
launchSettings.json
is only used by Visual Studio. You can use Octopus variables in Octopus.launchSettings.json
for publishing an app.appsettings.json
. This will make deployments easier, since Octopus recognizes this file by default.web.config
is used by IIS, not by your .NET Core application directly, hence IIS limitations to what you can configure might be applied.Hints.
appsettings.json
, e.g. appsettings.Release.json
.appsettings.json
file, especially in environment specific one, e.g. appsettings.Release.json
may contain a config value like "#{ConnectionString}" and during deployment Octopus would substitute this placeholder with the actual value from Octopus variables.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With