Talemul Islam
Talemul Islam

Reputation: 53

Publishing web application failed

When publishing my web application, I get the following error:

Done executing task "CopyPipelineFiles" -- FAILED.
Done building target "CopyAllFilesToSingleFolderForPackage" in project "ServiceManagement.csproj" -- FAILED.
Done building project "ServiceManagement.csproj" -- FAILED.

I use Visual Studio 2015. I also tried opening it in administrator mode.

Upvotes: 4

Views: 3051

Answers (3)

benjamingranados
benjamingranados

Reputation: 528

I kind of had this issue and was because of a corrupted file that couldn't sync in OneDrive. I had a folder that coudn't be opened or deleted with the message "tag present in the reparse point buffer is invalid". By making a "chkdsk /r /f" in a Command Prompt (w/ admin permissions) my build was fixed and I could publish it again in Azure.

Upvotes: 0

Willy David Jr
Willy David Jr

Reputation: 9171

I was able to fix it with the following actions:

  • Remove all unrelated scripts and libraries that you are not using on your project.
  • Remove all src folders on your scripts.
  • Since I copied the whole project script files with its corresponding directories, this was I think the main issue that cause the publishing to fail as some filenames are long.
  • I retain only the one javascript file and one minified file, the same way with CSS files.

If you weren't able to still solve the issue after doing the actions above, try the following (Either of this actions works for us.):

  • Try to rebuild the project on a different machine.
  • I am using Visual Studio 2015 Professional Edition so I tried the Visual Studio 2017 to build and publish it.

Upvotes: 1

William
William

Reputation: 549

One possible cause is, if you have included some files in the project that are not necessary to compile (like PowerPoint files or word files), & then removed the files from the hard drive, but forgot to delete them in the "Solution Explorer" inside Visual Studio - then "Rebuild Solution" will work b/c those files were not necessary to compile - but "Publish" will fail b/c it cannot find those files when Visual Studio tries to copy files to the publish destination.

Upvotes: 2

Related Questions