Visual Studio 2012 Web Publish doesn't copy files

Jeff Papp picture Jeff Papp · Aug 30, 2012 · Viewed 145.3k times · Source

I have a Web Application project in VS 2012 and when I use the web publishing tool it builds successfully but doesn't copy any files to the publish target (File System in this case).

If I look at the build output I can see everything gets copied over to obj\Release\Package\PackageTmp\ correctly but then all I see in the build output is this:

4>Done building project "{Project}.csproj".
4>Deleting existing files...
4>Publishing folder /...
4> ========== Build: 3 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

Even though it says the publish succeeded there are not files in the target directory for the publish.

I have seen this in multiple projects and sometimes it seems like the Solution/Platform configurations cause this problem but I haven't been able to pinpoint an exact cause for this.

Has anyone else seen this happening or have an idea on how to get this working correctly?

UPDATE:

I may have found a workaround for this. I just had this happen again and I was messing around with the publish settings. Once I changed the selected Configuration on the Settings tab away to another configuration and then back to the one I wanted to use all my files started publishing again. Hopefully this works on other projects in the future.

UPDATE 2:

I posted a bug on Microsoft Connect and heard back from a developer on the VS Web Developer team. He said they have fixed this issue in their internal builds and will releasing an update to the publish tool soon that will fix this problem.

UPDATE 3:

This has been recently fixed with Visual Studio 2012 Update 2

Answer

Roberto Nunes picture Roberto Nunes · Sep 12, 2012

Same problem. The workaround was changing the publish settings from Release to Debug. Re-publish and then change back to Release...