Up until two days ago, I was able to use Visual Studio 2010\'s \"Publish Web\" option by right clicking on my project and clicking the publish button on the context menu. No
Me also faced same issue, I just removed yellow marked file from visual studio project solution & it worked fine for me.
I deleted all the existing publish profiles in visual studio -> solution explorer -> My Project Node -> Properties -> Publish Profiles The same can be done by right clicking Project in solution explorer -> Publish -> Profile tab -> Manage Profiles -> Remove all profiles Now download the relevant profile from Azure or choose from your directory if it's already save on your machine and choose it. Then clean and rebuild the project. Make sure you've chosen the project is built in Release mode and you've also chosen "Release" Publish -> Settings -> Configuration Now Publish, it worked for me.
I recently faced the same issue. And I actually traced it by searching the file which was missing.
Reason for the error : In visual studio I had included the file and later on deleted it from file system.(but not from visual studio). VS had still had the reference to that file. So once I deleted the reference from VS I was able to publish successfully !
The cause of it is the transfer your project from different environment. To solve it, delete "obj" folder from your project directory as well as from solution explorer by right click on "obj" folder.
After that build your project and publish it. It will work normally.
In my case it was delted file from Projects folder. It was added to project but it was not in source folder. I found that it shown with exclamation mark in visual studio:
when i excluded file form project publishing started to work
Exclude the bin (and/or) obj folder from project and publish. This worked for me