Why isn't the Visual Studio 2012 web publishing wizard copying my files to the destination?

6.4k Views Asked by At

UPDATE: This has been recently fixed with Visual Studio 2012 Update 2 (Visual Studio 2012 Web Publish doesn't copy files)

I'm using the Visual Studio 2012 web publishing wizard. I have some saved profiles. Ones for various development and test servers. In two different projects, for certain publishing profiles the wizard won't actually deploy any files. It deletes the existing files on the server and then doesn't deploy anything.

This is that I get in the output window: (In this example I tried toggling off the "delete files on destination" option to see if it would make a difference. It didn't.)

1>------ Build started: Project: WebProject, Configuration: Prod Any CPU ------
1>  WebProject -> C:\_TFS\WebProject\Release\R2012-10-16\Source\WebProject\Website\bin\Website.dll
2>------ Publish started: Project: Website, Configuration: Prod Any CPU ------
2>Connecting to C:\Deployments\Web Sites\Website...
2>Transformed Web.config using C:\_TFS\Website\Release\R2012-10-16\Source\Website\Website\Web.Prod.config into obj\Prod\TransformWebConfig\transformed\Web.config.
2>Copying all files to temporary location below for package/publish:
2>obj\Prod\Package\PackageTmp.
2>Publishing folder /...
2>
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

(Project name anonymized.)

Notice that it says Publishing folder /..., but then just stops and claims success. The target folder is empty. This has happened when deploying to both local directories and network paths.

If I create a new publishing profile using the exact same settings it works fine. I just deleted it, then recreated it with the same name, and now it deployed all of the files. I shouldn't have to do this. Anyone have a clue what's going on?

1

There are 1 best solutions below

1
On BEST ANSWER

I don't know if you ever found the solution, but I think you might find this helpful - it was basically the same thing - I ran across this problem myself with a "publish profile" someone else had created, was saved in our source control system and flat out wouldn't work. Scroll down past the accepted answer and look at the description where the person is talking about the difference in the XML configuration files...it looks like there's a small bug in Visual Studio's deploy where it will show a success even though it just quits if parts of the XML publish files don't match exactly.

Another StackOverflow page where this should answer your question

Also, take a look in your Project in the Properties --> PublishProfiles folder (make sure you have "Show All Files" turned on in your solution explorer, and then open up your *.pubxml.user file and look and see if there are any files listed in there...when mine failed, that file didn't have any referenced files in there.