I am using TFS 2018 on-prem to build by ASP.Net Core application. I use the Visual Studio Build task (Version 1.*) with no additional MSBuild arguments. That is I just build my project by pointing to the project.sln
file.
The issue is I don't get my appsetting.*.json
in my build results so that I can do transformations on it. Both on build agent and my result zip file do not have the JSON file.
In my csproj, I do have the following:
<ItemGroup> <Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content>
...
</ItemGroup>
When I build through VS2017, I do get my appsettings.json files copied to the bin folders. If I publish from my VS2017, I get the appsettings.json files in my published folder.
What am I doing wrong? How do I get the TFS to build tasks to copy my JSON files?