launchSettings.json is copied to the output directory in latest 5.x preview
See original GitHub issueUsing CLI/SDK version 5.0.100-preview.6.20318.15 (public preview.6), the Properties/launchSettings.json
file is now being copied to the output directory when building the project. This was not the case in 3.x
It seems the file now has the CopyToOutputFolder
property set to PreserveNewest
. This also causes things like VS FastUpToDate to reevaluate the status of this file on every build invocation.
I think previously no files in the Properties
directory would ever be copied to the output directory.
Possibly related to https://github.com/dotnet/sdk/commit/fc3c0cc3d41776ed47e98e8c633124944b77802a?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How can I ensure that appsettings.dev.json gets copied to ...
json but it doesn't seem to have any effect. Is there another way I can force appsettings.dev.json to be copied to the output...
Read more >How to stop Visual Studio from creating launchsettings.json
In this post I show how to stop Visual Studio from automatically creating launchsettings.json files for your test projects.
Read more >Container Tools launch settings - Visual Studio
In launchSettings.json, the settings in the Docker section are related to how Visual Studio handles containerized apps. JSON Copy.
Read more >Run and debug .NET Core and ASP. ...
Using launch settings (launchSettings.json) to run and debug .NET Core apps in JetBrains Rider.
Read more >Using IConfiguration Inside Console App .NET Core
Just copy and paste the code below, and don't forget to create an appsettings.json file and set the copy to the output directory...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ack on this. We have a few other glob changes that we are planning to make in websdk. will make sure that covers updating the glob for launchSettings to None (for both web & worker).
@abpiskunov - Can you take care of this along with your other changes to the glob?
OK my bad, this is happening in 3.x SDKs too. Seems it was done as part of the changes to make
dotnet build
produce more output. However it results in things likelaunchSettings.json
being included in the set of files to evaluate when determining if a project’s output is up to date.Perhaps known files like this that we know can’t effect build output should be explicitly excluded from such evaluation. Is there an existing MSBuild attribute we can apply to it that would exclude it?
@drewnoakes @rainersigwald