Unable to load task handler PowerShell for task VSBuild

Audience

Everyone

If you are setting up to run Team Foundation Server’s vNext build system that Microsoft is previewing on VSO you may hit a “Unable to load task handler PowerShell for task VSBuild with version 1.0.1” error when you try to build on Windows Server Technical Preview.

Download Team Foundation Server 2015 today

Microsoft has released a CTP of TFS 2015 that includes the vNext build system. You can download TFS 2015 and try it out today. Remember that this is not a go-live version and you should not install it in production.

clip_image001

After you have configured a vNext build agent you may get an error when you try and build. This error occurs regardless of the tasks that you pick for your build.

****************************************************************************** 
Starting Build (debug, any cpu) 
****************************************************************************** 
Executing the following commandline: 
C:\VsoWinAgent\agent\worker\vsoWorker.exe /name:Worker-4649b2ea-e06d-47b0-9a89-5f4aa4d545df /id:4649b2ea-e06d-47b0-9a89-5f4aa4d545df /rootFolder:"C:\VsoWinAgent" /logger:Forwarding,1.0.0;Verbosity=Verbose,Name=Agent1;JobId=4649b2ea-e06d-47b0-9a89-5f4aa4d545df 
Unable to load task handler PowerShell for task VSBuild with version 1.0.1. 
****************************************************************************** 
Finishing Build (debug, any cpu) 
****************************************************************************** 
Worker Worker-4649b2ea-e06d-47b0-9a89-5f4aa4d545df finished running job 4649b2ea-e06d-47b0-9a89-5f4aa4d545df 

I tried to build both with the “Visual Studio Build” task and the “MS Build” tasks that come out of the box. Both resulted in the same error and I can only assume that there is an internal dependency on a particular PowerShell version that is not present.

After some investigation on Windows Server Technical Preview I noticed that only PowerShell 5 is available and enabled out of the box. Just like on Server 2008 R2, if you want an older version of PowerShell or .NET to be available then you need to go manually enable it.

clip_image002

If you launch the “Add roles and features” you should see, on the features tab, an option for PowerShell with only PowerShell 5.0 installed. As this is only available in the Technical Preview my assumption would be that the team targeted the latest common version. Which would be the 2.x version.

clip_image003

On Server 2012 R2 you will also find that only PowerShell 4.0 is configured by default and you will need to add PowerShell 2.0 here as well. This will in addition also enable .NET 2 / 3.5 if it has not been already.

clip_image004

Although a better error message could be used, like detecting if the Windows feature is indeed enabled, this is an alfa version of the product and you don’t expect any such polish. After enabling the feature, and re-running the build…

And Poo, I still have a problem, so that’s not it. This brought me to the end of my wits and I had to go ask some folks.

clip_image005

After a flurry of emails to my peers on the champs list Jakob asked if I had Unblocked the Zip files! Do what now?

It turns out that if you download a zip file from the internet it may be “partially” blocked. Windows will block access to some files that it deems risky but not warn you nor stop you from unpacking it. Unfortunately it will only partially unpack… which rendered my build agent useless.

So if you are downloading a Zip file from the internet you may need to unblock them before you can use them fully.

clip_image006

Woohoo… A successful build on the new Build vNext…

Upcoming Training Opportunities

These are the next five classes we have, and you can check out our full public schedule of classes.

Timezone:
Live Virtual Advanced Professional Scrum Product Owner Online on 6th February 2022
Virtual Advanced 0
6-9 Feb, 2023
09:00-13:00 EST
Live Virtual Professional Scrum Product Owner online 13th February 2023
Virtual Intermediate 0
13-16 Feb, 2023
09:30-13:30 GMT
Live Virtual Professional Scrum Master Online on 20th February 2023
Virtual Intermediate 0
20-23 Feb, 2023
09:00-13:00 EST
Live Virtual Applying Professional Scrum in Minecraft on 27th February 2023
Virtual Beginner 0
27 Feb-2 Feb, 2023
09:00-13:00 EST

We can deliver any of our courses as private in-house training over Microsoft Teams & Mural. We also recommend training based on your accountabilities or role, you can go directly to recommended courses for Scrum MastersProduct OwnersDevelopers and Agile Leaders.

Create a conversation around this article

Share on Facebook
Share on Twitter
Share on Linkdin

Related Courses

No items found

Read more

Martin Hinshelwood (He/Him) nkdAgility.com
https://youtu.be/ZrzqNfV7P9o Why does Minecraft make the APS course so awesome? I started teaching the APS (Applying Professional Scrum) course about twelve (12) years ago and added Minecraft last year to boost participation and complexity. The context for complexity in a classroom. Before Minecraft, I used to use an animal website …
Martin Hinshelwood (He/Him) nkdAgility.com
https://youtu.be/grJFd9-R5Pw How does the APS course help people apply scrum effectively? The APS (Applying Professional Scrum) course helps people apply scrum effectively in a number of ways. A practical encounter with Scrum. The APS course is incredibly practical and hands-on by design. So, during the course, people develop a deep …
Martin Hinshelwood (He/Him) nkdAgility.com
https://youtu.be/rX258aqTf_w In what circumstances is agile consulting appropriate? Agile consulting is almost always my first and favourite approach when working with customers. Internal Core Competencies The only reason why an organization thinks that they need an agile coach, rather than an agile consultant, is because of a systemic lack of …
Martin Hinshelwood (He/Him) nkdAgility.com
https://youtu.be/BE6E5tV8130 How is agile product development different to waterfall project management? Defining the difference between agile product development and waterfall project management is actually a very difficult task because most agile teams that I encounter are agile but under a waterfall project management environment. Defining waterfall project management. To understand …

OUR TEAM

We believe that every company deserves high quality software delivered on a regular cadence that meets its customers needs. Our goal is to help you reduce your cycle time, improve your time to market, and minimise any organisational friction in achieving your goals.

naked Agility Limited is a professional company that offers training, coaching, mentoring, and facilitation to help people and teams evolve, integrate, and continuously improve.

We recognise the positive impact that a happy AND motivated workforce, that has purpose, has on client experience. We help change mindsets towards a people-first culture where everyone encourages others to learn and grow. The resulting divergent thinking leads to many different ideas and opportunities for the success of the organisation.