Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does custom Build Process Template executing PowerShell fail
    primarykey
    data
    text
    <p>I've modified a custom build process template to execute Powershell on the build server. This is so I can run some scripts that will automate the deployment of our SharePoint solution. Everything was working fine up until I upgraded the build servers Powershell version from 2.0 to 3.0 (which needed to be done as I was installing SCVMM Admin Console 2012 and Powershell 3.0 was a pre-requisite).</p> <p>In the build template itself, I'm using a <strong>Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess</strong> work flow item to execute the PowerShell command with the following properties:</p> <blockquote> <p>Arguments : String.Format(" ""&amp; '{0}' -DropLocation '{1}' {2} "" ", ScriptFilename, BuildDetail.DropLocation, PostDropScript2Arguments)</p> <p>FileName : "powershell"</p> <p>OutputEncoding : System.Text.Encoding.GetEncoding(System.Globalization.CultureInfo.InstalledUICulture.TextInfo.OEMCodePage)</p> </blockquote> <p>Now every time I try to execute the build, I get the following error:</p> <blockquote> <p>Exception Message: File not found: PowerShell (type FileNotFoundException) Exception Stack Trace: Server stack trace:<br> at Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start() at Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.InvokeProcessInternal.RunCommand(AsyncState state) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]&amp; outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)</p> <p>Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData&amp; msgData) at System.Func<code>2.EndInvoke(IAsyncResult result) at System.Activities.AsyncCodeActivity</code>1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result) at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)</p> <p>Inner Exception Details:</p> <p>Exception Message: The system cannot find the file specified (type Win32Exception) Exception Stack Trace: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start()</p> </blockquote> <p>It seems like the build is no longer able to link the "powershell" command with the actual PowerShell file.</p> <p>I've manually gone onto the build server and typed "powershell" into a command line and it started PowerShell, as expected.</p> <p>Has anyone else experienced this issue before?</p> <p>Thanks very much</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload