none
Why do I get the error "The target GatherAllFilesToPublish does not exist"?

    Question

  • I have recently installed the new Azure development tools for Visual Studio 2010 service pack 1. Every time that I try to publish an existing website (using file system deployment) I get the following error:

    The target "GatherAllFilesToPublish" does not exist in the project.

    Can anyone tell me what I am missing?

    Thanks


    Tuesday, June 12, 2012 12:07 AM

Answers

  • Yikes, Thanks all, although it took me 3 hours to see this thread after pulling my hair.

    At first I saw the bizarre new Web Publish form and thought what am I smoking ...

    And all because I decided to look into using azure, oh well thanks decision made ....

    Amazing .... 

    update:

    OK, here is the actual cause of the problem, apparently installing azure  has a frenzy of fun, you just need to uninstall the following!

    Can I rant for a sec? This is the real solution, because seriously the addition of these items for azure breaks everyone of my web deploy apps? Seriously bad stuff ... just my 2 cents

    BTW, I don't even have Web Developer express installed so why it installed it .... you only really need the other one uninstalled but I want it all gone ...


    • Proposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
    • Edited by TD10 Thursday, June 14, 2012 3:34 AM
    • Marked as answer by Arwind - MSFTModerator Tuesday, June 19, 2012 10:16 AM
    Thursday, June 14, 2012 1:36 AM

All replies

  • Hi,

    Base on my understanding, File system deployment is used to deploy web application or website on IIS, Azure deployment donot need choose File System as the publishing way.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    Tuesday, June 12, 2012 10:02 AM
    Moderator
  • I'm having the same issue after installing the Visual Studio 2012 RC. Now if I create a new web project and I try to publish it I get this error, it's not an azure project.

    If I add a target named GatherAllFilesToPublish to the project file then it works but my File System publish destination folder stays empty.

    ------ Publish started: Project: XXX, Configuration: Debug Any CPU ------
    Connecting to C:\Temp\XXX...
    Deleting existing files...
    Publishing folder /...

    ========== Build: 7 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

    The Visual Studio 2010 publishing tool was changed, I didn't want that to happen, now it doesn't work. Hours of work lost.

    Tuesday, June 12, 2012 3:52 PM
  • Hi Eduardo,

    I added  

      <Target Name="GatherAllFilesToPublish">
      </Target> to project file and error gone.

    For empty destination folder I had the same problem if the publish profile was set to "Release" on configuration. I changed to "Debug" and suddenly publishing folder is filled. For sure "Debug" version is not what you want to publish but I found that at least "Debug" configuration is working.


    • Edited by Yuri Bonev Wednesday, June 13, 2012 8:40 AM
    • Proposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
    • Unproposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
    • Proposed as answer by Jason Carter Wednesday, November 28, 2012 9:08 PM
    Wednesday, June 13, 2012 8:24 AM
  • I did that, but the annoying part is that I need to add that to every project I work with manually, even the new projects are created with that missing target.

    Is there a way to get VS 2010 publishing to work the old way? If I uninstall VS 2012 RC that will work?

    Wednesday, June 13, 2012 1:56 PM
  • Same issue I'm having. Manually added target. Error gone but files are not being copied in either Debug or Release.


    Javier Soques

    Wednesday, June 13, 2012 2:22 PM
  • Yikes, Thanks all, although it took me 3 hours to see this thread after pulling my hair.

    At first I saw the bizarre new Web Publish form and thought what am I smoking ...

    And all because I decided to look into using azure, oh well thanks decision made ....

    Amazing .... 

    update:

    OK, here is the actual cause of the problem, apparently installing azure  has a frenzy of fun, you just need to uninstall the following!

    Can I rant for a sec? This is the real solution, because seriously the addition of these items for azure breaks everyone of my web deploy apps? Seriously bad stuff ... just my 2 cents

    BTW, I don't even have Web Developer express installed so why it installed it .... you only really need the other one uninstalled but I want it all gone ...


    • Proposed as answer by TD10 Thursday, June 14, 2012 3:33 AM
    • Edited by TD10 Thursday, June 14, 2012 3:34 AM
    • Marked as answer by Arwind - MSFTModerator Tuesday, June 19, 2012 10:16 AM
    Thursday, June 14, 2012 1:36 AM
  • Thanks TD10 it solved the issue, I'm back to the old publish window.
    Thursday, June 14, 2012 1:28 PM
  • Your welcome. I'm adding the following additional error in case someone is searching on that instead. I was initial having the problem using the publish method: Web Deploy but found no help. It was only when I tried the file system method that I found this thread ...

    Missing or Invalid property value for $(MsDeployServiceUrl)

    Error 4 The "NormalizeServiceUrl" task was not given a value for the required parameter

    Thursday, June 14, 2012 2:57 PM
  • Guys I'm terribly sorry you are running into this issue.

    I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

    To resolve this you should be able to follow the steps below:

    Can you try it out and let me know if it works or not?

    Friday, June 22, 2012 9:32 PM
  • It's good to know that for the next time it happen's, if ever. I had to re-install everything, I was pulling my hair. :(

    Thanks


    Javier Soques

    Friday, June 22, 2012 11:04 PM
  • Worked, thanx
    Saturday, June 23, 2012 2:00 PM
  • No, it did not work. The folder is still empty after a file deploy in release.

    Also, I don't know what that patch did, but it did not create a new Microsoft.WebApplication.targets file.

    Tuesday, June 26, 2012 7:20 PM
  • After install/repair the component,it works!

    Thanks

    Saturday, June 30, 2012 6:18 AM
  • Running VS10SP1-KB2591016-x86.exe did not recreate a new Microsoft.WebApplication.targets file.

    Running repair on "Microsoft Web Publish - Visual Studio 2010" does recreate this file, but does not fix my issue.

    The folder is still empty after a file system deploy.

    obj\Release\Package\PackageTmp appears to have the files. It is just not copying them over to the publish location.

    I don't want to just uninstall this new publish tool (as suggested above), because I also need to publish to Azure.

    Wednesday, August 15, 2012 7:54 PM
  • My machine does not have the path that Sayed mentions. I only have:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications

    However, running the exe at his link solved the problem for me. My original Microsoft.WebApplication.targets did not change and is still dated 8/11/2011.

    I do have the Azure June SDK installed but not VS 2012. I do have Web Matrix 2 RC installed so that's probably what caused the problem for me.

    Tuesday, August 21, 2012 12:23 PM
  • Guys, the following proposed solution is only for VS2010, not VS2012:

    Thursday, August 23, 2012 12:10 AM
  • Yes, it works for VS2010.

    But strange that the original file had the modify date as of 2011-01-18 and the new one is dated 2011-08-11 which is definitely more recent.

    Friday, August 24, 2012 2:04 PM
  • I think, that upgrading from VS 2010 to 2012 left the path to the targets files to v10.

    You just have to edit project file and change the path in tag <import project> to v11.0

    i.E. <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />

    Hope that helps.

    Tuesday, October 16, 2012 8:44 AM
  • Guys I'm terribly sorry you are running into this issue.

    I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

    To resolve this you should be able to follow the steps below:

    Can you try it out and let me know if it works or not?


    This one works for me... anyway, the v11.0 folder don't exist in my computer and also I removed the Web Publish components as recommended in previous post

    Ricardo Noerr

    • Proposed as answer by AKianYong Thursday, September 12, 2013 4:34 AM
    Monday, December 10, 2012 2:09 PM
  • I was getting this error in VS2012 (for a project initially created with VS2010).  I was able to resolve this by editing the csproj file.  It previously contained:

    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

    Changing that to the following fixed it for me:

    <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />

    Thursday, December 27, 2012 11:54 PM
  • Yes - fixed it for me.

    Many thanks

    Friday, February 15, 2013 10:59 PM
  • Niedawno zainstalowano nowe Azure narzędzi rozwojowych dla Visual Studio 2010 z dodatkiem Service Pack 1. Za każdym razem staram się publikować istniejącej strony internetowej (wykorzystując wdrożenie systemu plików) pojawia się następujący błąd:

    Target "GatherAllFilesToPublish" nie istnieje w projekcie.

    Czy ktoś może mi powiedzieć, czego mi brakuje?

    Dzięki



    • Proposed as answer by K.Łożyński Saturday, February 16, 2013 9:49 PM
    • Unproposed as answer by K.Łożyński Saturday, February 16, 2013 9:50 PM
    • Proposed as answer by K.Łożyński Saturday, February 16, 2013 9:50 PM
    Saturday, February 16, 2013 9:49 PM
  • Guys I'm terribly sorry you are running into this issue.

    I think that I know what the issue is. When you install the Azure SDK bits it installs some VS Web Publish updates. One of these updates the file at C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets. Based on how our setup is defined if that file has an updated timestamp (for whatever reason) then when you install the new component the file does not get updated.

    To resolve this you should be able to follow the steps below:

    Can you try it out and let me know if it works or not?

    I did not have a v11.0 folder, so I renamed C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets to Microsoft.WebApplication.targets.bak, and then ran the attached link. This created a new Microsoft.WebApplication.targets dated 9/24/2012 and fixed the problem.

    Thanks!

    Tuesday, April 30, 2013 3:31 AM
  • Great job Sayed, saved me a few hours of research!!!

    Tks a lot!

    Tuesday, May 21, 2013 1:47 PM
  •   <Project>
    <!-- [...] -->
     <Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
        <AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
      </Target>
      <!-- AVR: for workaround publish error: "GatherAllFilesToPublish" no existe en el proyecto -->
      <Target Name="GatherAllFilesToPublish">
      </Target>
      <ProjectExtensions>
    <!-- [...] -->
    </project>

    It works find for me,

    Thanks very much


    Asereware

    • Proposed as answer by Asereware Friday, June 14, 2013 4:44 PM
    Friday, June 14, 2013 4:42 PM
  • Yes ... this one works for me too.  I am using VS2010.
    Thursday, September 12, 2013 4:35 AM
  • Sayed, Thanks so much.  Pulling my hair out since yesterday but that ended today with your post.  I renamed the targets file, installed the exe you provided...and it worked!

    Oddly enough, prior to my troubles with this project, I web deployed a different project and that worked fine.

    Thanks

    Sunday, November 17, 2013 1:07 PM
  • Followed the suggestion from Yuri without success, 

     then I found the tag at end of config file as shown bellow to

    <TargetName="MvcBuildViews"AfterTargets="AfterBuild"Condition="'$(MvcBuildViews)'=='true'">

    and I changed to

    <TargetName="GatherAllFilesToPublish"AfterTargets="AfterBuild"Condition="'$(MvcBuildViews)'=='true'">

    so, it started deploying to file system as before I install the Azure SDK 2.2.


    Bjunio

    Friday, March 07, 2014 7:39 PM