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
This worked for me fix - gather all files to publish error
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Add the following above the line.
Save and Reload project.
Sayed's solution did not work in my project which was upgraded using VS2012. But this worked
I've been struggling with the same problem with Visual Studio 2013 (and 2015).
The crucial fix for me was to add the
VSToolsPath
property setting, which was missing in my project file, for whatever reason.I added this into the
<PropertyGroup>
directive:As a side note: My project file is also referencing the v10.0 version of the
Microsoft.WebApplication.targets
file, but that seems to be okay.Right click the project and select Edit (project name).csproj. (e.g. Edit in notepad) Look for Add the following above the line.
13.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) Save and Reload project.
This really work for me, Thanks
Same problem with VS2017. You can try this, it worked for me.
search the keyword "WebApplication.targets"
COMMENT or REMOVE this line.(maybe two lines depending on "Condition")
In this step, it will prompt you to install some package about 500M...
After that, reload project, then it works!
I guess I just miss some components when I install VS 2017.
Also I notice the MSBuild Path is quite different in VS2017, but maybe that's not related to the problem cuz it uses relative path in the csproj file..
I had similar issue when I wanted to publish my ASP.Net application to Windows Azure. After many trial and error finally this solution worked for me. This does not need any renaming of files or any installation / reinstallation of hotfixes / patches. Here is what you have to do:
Open the ASP.Net project file (.csproj) in Wordpad / Notepad and find the line looking similar to this:
Replace it with line as given below: