VS 2017 creates a file for ASP.NET Core MVC projects, called launchSettings.json
, which contains information about IIS Express and Kestrel AMAIK.
We host our projects in IIS even on development machines, thus we don't really need these files.
We delete them, yet they keep coming back and each time we open up a solution, they show up.
Is there a way to prevent VS from creating those files?
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.
This file is the same configuration file that you can use when running Visual Studio on Windows or from the command line through dotnet . This file is stored in your project under the Properties folder.
json launchSettings. json, which is placed in the Properties folder of a project, describes how the application can be launched — the command to execute, whether the browser should be opened, which environment variables should be set, and so on.
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.
As per https://developercommunity.visualstudio.com/comments/652195/view.html - just add the following property to the .csproj:
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
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