a·gen·tic a·gil·i·ty

Could not load file or assembly while configuring Build vNext Agent

TL;DR; If you are testing the new vNext build agent on Windows Server 2012 R2 with Visual Studio 2015 Preview, you may encounter a “Could not load file or assembly” error due to a DLL version mismatch and strong name validation. This issue only occurs with the Preview version and should resolve in future releases. As a temporary fix, disable strong name validation by running “sn -Vr ,” on the server, but only do this in test environments, not in production.

Published on
2 minute read
Image
https://nkdagility.com/resources/zd3C3XiE0H4
Subscribe

If you are using Windows Server 2012 R2 to test out the new vNext build agent then you may run into an error where it could not load file or assembly while configuring Build vNext Agent.

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.

I have been playing around with the new Build vNext Agent that Microsoft has been developing and I found that I was not able to register the Agent on Windows Server 2012 R2 when I had Visual Studio 2015 Preview installed. Before I installed Visual Studio I had no issues, but once on I got a “Could not load file or assembly” when trying to run the registration.

Could not load file or assembly while configuring Build vNext Agent

It looks like there is a version mismatch on the DLL.

1Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'Microsoft.VisualStudio.Services.Client, 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)
2
3--- End of inner exception stack trace ---
4
5at VsoAgent.Program.Main(String[] args)
6
7WARNING: UnConfigure agent finish with Error, you can check logs under _diag folder, determine whether you can ignore the error.

I am fairly sure that this is a time limited error and once VS 2015 comes out of Preview, or the DLL versions settle down this will not be an issue, however to fix it for now we need to turn of Strong Naming for .NET at the command prompt.

Could not load file or assembly while configuring Build vNext Agent

You need to run “sn -Vr *,*” on the server to disable strong signing. This should only be the case as part of the current preview program. I would expect this issue to go away with the next release, at least on Server 2012 R2.

This is only required when you are running Visual Studio 2015 Preview on the Build vNext Agent.

Smart Classifications

Each classification [Concepts, Categories, & Tags] was assigned using AI-powered semantic analysis and scored across relevance, depth, and alignment. Final decisions? Still human. Always traceable. Hover to see how it applies.

Subscribe

Connect with Martin Hinshelwood

If you've made it this far, it's worth connecting with our principal consultant and coach, Martin Hinshelwood, for a 30-minute 'ask me anything' call.

Our Happy Clients​

We partner with businesses across diverse industries, including finance, insurance, healthcare, pharmaceuticals, technology, engineering, transportation, hospitality, entertainment, legal, government, and military sectors.​

Higher Education Statistics Agency Logo

Higher Education Statistics Agency

Big Data for Humans Logo

Big Data for Humans

Akaditi Logo

Akaditi

Lean SA Logo

Lean SA

Qualco Logo

Qualco

SuperControl Logo

SuperControl

Lockheed Martin Logo

Lockheed Martin

Philips Logo

Philips

DFDS Logo

DFDS

CR2

Alignment Healthcare Logo

Alignment Healthcare

Workday Logo

Workday

Epic Games Logo

Epic Games

Ericson Logo

Ericson

Slaughter and May Logo

Slaughter and May

Sage Logo

Sage

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Flowmaster (a Mentor Graphics Company) Logo

Flowmaster (a Mentor Graphics Company)

Department of Work and Pensions (UK) Logo

Department of Work and Pensions (UK)

Ghana Police Service Logo

Ghana Police Service

Washington Department of Enterprise Services Logo

Washington Department of Enterprise Services

New Hampshire Supreme Court Logo

New Hampshire Supreme Court

Nottingham County Council Logo

Nottingham County Council

Washington Department of Transport Logo

Washington Department of Transport

Graham & Brown Logo

Graham & Brown

Sage Logo

Sage

Microsoft Logo

Microsoft

Brandes Investment Partners L.P. Logo

Brandes Investment Partners L.P.

Lockheed Martin Logo

Lockheed Martin

Alignment Healthcare Logo

Alignment Healthcare