1

Installed VS2017 from scratch and moved existing vb.net, c# webform solutions to the new laptop. First issue was related to "The target GatherAllFilesToPublish does not exist" error which I fixed by opening vbproj (or csproj on another project) and add this line:

<Target Name="GatherAllFilesToPublish">
</Target>

Now I was able to publish with no errors but the output in the destination folder is the entire solution including .aspx.vb or .aspx.cs files, .Global.asax.vb, .aspx.designer.vb files etc.

Checked the project Package/Publish Web settings and Items to deploy is set to "Only files needed to run this application".

enter image description here

Still the publishing copies the entire solution instead only the aspx, dll and only what is needed. Any idea what I am doing wrong ?

shiraz
  • 188
  • 3
  • 10
  • See if this answer matches your situation: https://stackoverflow.com/questions/10989051/why-do-i-get-the-error-the-target-gatherallfilestopublish-does-not-exist – Iain Ballard Jun 06 '17 at 13:12
  • Iain Ballard: I was unable to use it, when I try installing the patch i get: KB2591016 does not apply, or is blocked by another condition on your computer. – shiraz Jun 06 '17 at 13:20

1 Answers1

0

Edit csprojfile,in that file change vs version of your old project to vs 2015 in property group.save the file and rebuild .it will work properly.

Rajesh
  • 1
  • 1
  • Rajesh: I tried changing from 10.0 to 13.0 and 15.0 but with no luck 14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) – shiraz Jun 06 '17 at 14:34