I have the following script set as my VS2010 pre-build script:
cd "$(ProjectDir)"
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe "$(ProjectDir)Build.ps1"
Can someone please explain why it exits with a code of 1 and throws a build error?
Thanks,
Alex.
Powershell returns an exit code of 1 when there is an uncaught THROW in a script. If you’re sure this isn’t the case (or you aren’t concerned with it), you can always end your script with
EXIT 0