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.

dotnet publish doesn't copy appsettings.json on the default template with Asp.Net Core 1.1.0

See original GitHub issue

I created an Asp.Net Core 1.1.0 App with VS 2017 RC on Windows.

After cloning the repo (https://github.com/jeffpapp/AspNetCore1_1_0/tree/master/src/AspNetCore1_1_0) on macOS and then running dotnet publish I see it creates a bin/Debug/netcoreapp1.0/publish directory but doesn’t publish the appsettings.json file.

I don’t know if this is an issue with dotnet publish or the template included in VS 2017 RC

Issue Analytics

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

github_iconTop GitHub Comments

9reactions
TCGVcommented, May 21, 2018

For those using .NET Core 2.0 the configuration has changed to:

  <ItemGroup>
    <None Include="appsettings.json" CopyToPublishDirectory="Always" />
  </ItemGroup>
0reactions
shanmukhigcommented, Feb 26, 2020

For those using .NET Core 2.0 the configuration has changed to:

  <ItemGroup>
    <None Include="appsettings.json" CopyToPublishDirectory="Always" />
  </ItemGroup>

This is the solution to the issue. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AppSettings.*.json files not copied on Publish in ASP.NET ...
I am publishing an ASP.NET Core 1.1 project with .csproj file ... When I publish it the project is compiled and all the...
Read more >
Configuration in ASP.NET Core
The default JsonConfigurationProvider loads configuration in the following order: appsettings.json; appsettings.{Environment}.json : For example ...
Read more >
Migrate from ASP.NET Core 1.x to 2.0
This article outlines the prerequisites and most common steps for migrating an ASP.NET Core 1.x project to ASP.NET Core 2.0.
Read more >
How to handle appsettings.json? : r/dotnet
Can't I just copy-paste my production appsettings.json somewhere where it won't be accessible by anyone? BTW: I'm hosting using Azure App ...
Read more >
Upgrading from .NET Core 1.0 to 1.1 with Visual Studio 2015
I literally just copied this text from the folder name of the SDK I want to target which is stored under “C:\Program Files\dotnet\sdk”....
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