Pre-build step fails - could not create output file

joel.hammond-turner's Avatar


24 Jun, 2015 10:14 AM

I've got a project where a pre-build step zips up some content for use in an installer - along these lines...

$(SolutionDir)/tools/zip.exe $(ProjectDir)/Templates/ $(SolutionDir)/TemplateProject/Content/*.*

This works perfectly locally, of course, but under AppVeyor I the zip.exe fails with the error "Could Not create output file"

How do I change my build to allow modifications to the source folder structure (creating the zip) during the build?

  1. Support Staff 1 Posted by Feodor Fitsner on 24 Jun, 2015 05:24 PM

    Feodor Fitsner's Avatar

    Hi Joel,

    Build agent has administrative privileges on build worker VM and you can do virtually everything with VM. Could it be that file already exists and has read-only attribute set? Also, try using 7z.exe which is in PATH.

  2. 2 Posted by joel.hammond-tu... on 30 Jun, 2015 12:39 PM

    joel.hammond-turner's Avatar

    Turns out Zip.exe wasn't creating the target folder automatically.

    Putting a readme in the folder in source control fixed that.

    Now I'm getting another error!

  3. joel.hammond-turner closed this discussion on 30 Jun, 2015 12:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac