In the Build properties of my project I have 'Treat warnings as errors' to None:
This works fine when building but when I try to publish to a local folder I'm getting 14 errors that should be warnings. Does anyone know how to disable treating warnings as errors when publishing in Visual Studio 2019?