I have a ASP.NET Core 2.2 white label app with a separate config.json file. I want to be able to exclude this file from being deployed when I call dotnet publish (from VS Code) so that I don't accidentally overwrite my UAT and Prod setups.
With ASP.NET you could add <ExcludeFilesFromDeployment> inside <PropertyGroup>. I've tried this in my .csproj file but it doesn't seem to be working and I can't find any reference to this element in the asp.net core docs. It looks like it might be an outstanding issue according to https://github.com/aspnet/vsweb-publish/issues/73
In previous versions of Core you could use publishExclude in the project.json file but that doesn't exist in ver 2.2
How can I exclude files on a dotnet publish?