Mike McCoy Mike McCoy - 11 days ago 4
ASP.NET (C#) Question

Publish of application fails to find file that exists

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

where the error below says it can't find the file I can clearly see the

Copying file Properties\PublishProfiles\git.pubxml to obj\Release\Package\PackageTmp\Properties\PublishProfiles\git.pubxml failed. Could not find file 'Properties\PublishProfiles\git.pubxml'.

I've checked directory security settings and those are proper. I tried deleting my
but nothing is making a difference.


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.