PowerShell .ps1 file on Visual Studio post build event -
I am trying to execute the following post build event code but I am getting a non-useful error:
"c: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell.exe" -file "$ (SolutionDir) Tools \ nuget_pack.ps1" I have participated
UPDATE / strong> It's weird, I'm VS No errors have been found on But the script is not working when I run it from the powerhell console, I get the following error:
You can reproduce errors in parsers :
"This is a string" -file "my.ps1" This is taking the first time as a string, -file as -f format flag and saying that format There is not a price expression on the right for replacement. Try this type of:
& amp; "C: \ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell.exe" -File "$ (SolutionDir) tool \ nuget_pack.ps1"
(As for Keith notes, This will not work as it is run from a ballet file compared to the PowerShell.)
Or simply:
powershell.exe -file "$ (SolutionDir) Tools \ nuget_pack.ps1 "/ code>
Comments
Post a Comment