Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2015 community- Publish failed due to build errors.

CLR-x86-1.0.0-beta7-15532

VS community v14.0.23107.0

Attempting to publish my Web API application to a local folder but right after the "Copying to output path C:\temp\PublishTemp", I get the following message:

Publish failed due to build errors. Check the error list for more details.

However, there are no build errors or warnings.

If I make a new web application it publishes to my test folder without issue.

Where should I start troubleshooting this?

like image 233
proggrock Avatar asked Oct 20 '15 13:10

proggrock


2 Answers

In Visual Studio go to Tools > Options and increase the MSBuild output verbosity. This will flood the Output window log with all the information you need:

enter image description here

like image 187
Roman Pletnev Avatar answered Sep 21 '22 16:09

Roman Pletnev


I was experiencing the same problem and the accepted solution did not help, because the problem was with publishing, and not building (despite what the error says). I tried the accepted solution but it didn't help because there were no errors when building.

The solution for me was one of 2 options:

  1. Remove the option (in the publish profile) to delete existing files when publishing
  2. Ensure nothing is preventing file deletion - or more importantly folder deletion - on the target machine

I had a command prompt window open on the server, in a folder in the project directory which was preventing the folder from being deleted.

like image 27
marcslevesque Avatar answered Sep 18 '22 16:09

marcslevesque