Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS (Preview) build failes due to missing assembly?

Tags:

tfs

I'm new to TFS and trying to do my first automatic build through the hosted TFS (tfspreview.com) but it fails due to a missing assembly.

One of my projects in the solution references Microsoft.WindowsAzure.Configuration. The reference has Copy Local set to True but it seems like it doesn't exist/isn't found by the TFS.

How do I tell TFS where to find the assembly?

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1561): Could not resolve this reference. Could not locate the assembly "Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

like image 373
Jonas Stensved Avatar asked Jun 14 '12 06:06

Jonas Stensved


1 Answers

Found the answer in Using NuGet with TFS Build Automation. It failed because I've added the reference through NuGet.

This is needed to make it work:

  1. Right click on the Solution in Solution Explorer
  2. Click on “Enable NuGet Package Restore”
  3. Click “Yes” when prompted

The blog has a lot more information so have a look for a complete fix with explanations.

like image 175
Jonas Stensved Avatar answered Nov 19 '22 08:11

Jonas Stensved