Reputation: 3289
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?
Upvotes: 13
Views: 12662
Reputation: 3
For me, the error was that the folder where it was trying to publish was not existing (weird) and it was lack of admin priveledges. So a solution is:
Upvotes: 0
Reputation: 981
It seems that you are missing a file that's included in the project but does not exist on disk at the expected location. This can happen when you move or delete the file from outside of Visual Studio (usually a non-compiled resource, such as files like .js, .css, .txt, etc.). If that's the case, try the following to solve the issue:
I hope this helps.
Upvotes: 3
Reputation: 31
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:
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.
Upvotes: 3
Reputation: 452
Sounds like Permissions if it happens at the copying portion or somthing is blocking the copying (existing files locked?), if you start VS as an administrator it should work if it's a permission issue.
Compilers always build to intermediate directories, for example, obj\configname. At the conclusion of the build process, the project system copies the files from the intermediate directory into the project output directory.
Upvotes: 2
Reputation: 6138
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:
Upvotes: 28