question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

launchSettings.json is copied to the output directory in latest 5.x preview

See original GitHub issue

Using 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?

@vijayrkn

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
vijayrkncommented, Jul 9, 2020

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?

1reaction
DamianEdwardscommented, Jul 1, 2020

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 like launchSettings.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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found