I have a command on the post-build event command line command in Visual Studio 2010
Powershell -command .'$(SolutionDir)Powershell\MoveFiles.ps1'
And when the event is fired, I get an error that the command "exited with code 1".
However, when I run the same command on the command line (see below), with the actual directory instead of the VS2010 macro, it works fine.
Powershell -command .'C:\TFS\MyProject\Main\Source\Powershell\MoveFiles.ps1'
So it seems that the problem is how the VS2010 executes the command.
What could be causing this problem?
[UPDATE]
I also tried changing the post-build event:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Powershell -command .'C:\TFS\MyProject\Main\Source\Powershell\MoveFiles.ps1' and I get the same result as above. It works on startup from the command line, but not from VS 2010.
source share