Could not load file or assembly while configuring Build vNext Agent

By : Tjeerd
Source: Stackoverflow.com
Question!

When trying to configure a Build vNext agent I keep running into the following exception.

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'VsoAgent, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)

I already tried disabling strong name verification using "sn -Vr *,*" as sugested here: http://nakedalm.com/could-not-load-file-or-assembly-while-configuring-build-vnext-agent/

But that does not solve the error. I tried the same on VM's with Visual Studio 2013, 2015 CTP5 & 2015 CTP6.

I followed this guide to configure the Build.vNext agent

EDIT: Some more info.

I'm trying to configure this on a VM in Azure. I've tried the default Visual Studio Templates from the Gallery. Which means VM's with Server 2012 R2.

enter image description here

By : Tjeerd


Answers

After downloading the latest version of the VSoAgent.zip file the problem went away. It seems to have been fixed in a newer release of the Agent.

By : Tjeerd


Did you "unlock" the .zip file before unpacking it?

On some OS's, specifically Windows 10, I had to right click on the downloaded zip and click "unlock" before unpacking.

If you then run the .\ConfigureAgent.ps1 it should work.

By : MrHinsh


This video can help you solving your question :)
By: admin