I've run into this issue when trying to publish my application today that I have published many times before. I'm trying to publish to a directory.
The issue I have is, if I go to my app directory
Copying file Properties\PublishProfiles\git.pubxml to obj\Release\Package\PackageTmp\Properties\PublishProfiles\git.pubxml failed. Could not find file 'Properties\PublishProfiles\git.pubxml'.
VS was saying it couldn't find that file because the
git.pubxml file in that directory was of type
USER File and it needed to be
PUBXML. When I added the correct file type from another version of that same project, I was able to publish the project again. I believe the
PUBXML file was removed by mistake in source control.