This is a followup of a question I asked before. In a nutshell I run a 64 bit version of cmd from visual studio (which is 32 bit application). I do this because I need to run a command oscdimg.exe which is only accessible from 64 bit version of cmd.
<Target Name="AfterBuild">
<Exec Command="%windir%\sysnative\cmd.exe /c "$(ProjectDir)test.bat UPLOAD"" WorkingDirectory="$(ProjectDir)" />
</Target>
Now while this works fine, I receive following error.
error MSB3073: The command "%windir%\sysnative\cmd.exe /c "C:\XXXX\XXX\XXX\test.bat UPLOAD"" exited with code -1.
While this error is not disrupting my work, meaning the batch performs its tasks successfully, it still is nice to fix this error message, as others in my team questions this error message.
I am making an assumption that this error is triggered because although the visual studio is 32 bit application, the build or exec calls for windows operating system application which may be 64 bit application. And 64 bit application cannot see the sysnative virtual folder.
Is there any way to resolve this error?
EDIT: Added argument to the command to simulate the real use and to show the reason I add "
.