I am trying to build a C# ASP.NET project with MSBuild.exe on the command prompt in Windows 8.1, but am getting an error. The error message is extremely long but essentially is:
error MSB3073: The command "mkdir..." exited with code 255
Here's the full one:
!https://i.stack.imgur.com/BKkxA.jpg
There seems to be some kind of trouble with a Temp directory. The project builds and runs on Visual Studio 2013 fine, but doesn't seem to be working here.
Things I've tried so far
- Using different MSBuild locations
- Specifying Visual Studio Version for MSBuild
- Using the Visual Studio and regular command prompt to use MSBuild
- Using different MSBuild versions
- Moving the entire project to a file path without spaces
I'm suspicious that different build order between VS and MSBuild could be causing the issue, but I'm not sure if that is the case and if it is, what the best way to fix that would be.
EDIT
It's come to light that the issue likely has something to do with the Post-Build event. I've tried out a couple different ways of using quotes around the $(ProjectDir) in the Post-Build command, but to no avail. I've tried removing some of the Post-Build commands, and have narrowed the issue down to one of the following commands:
mkdir "$(ProjectDir)Temp"
for /r "$(ProjectDir)Module" %%I in (*.js)