TFS Build: Could not resolve this reference. Could not locate the assembly ”. Check to make sure the assembly exists on disk.

A TFS Build fails probably after a new reference has been added. Possibly a .exe reference

ERROR
TFS Build: Could not resolve this reference. Could not locate the assembly ‘<name>’. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors

SOLUTION
In Team Explorer > Builds > Build Explorer > Select broken build and double-click to work out which project did not build
Visual Studio > Projects > Project Dependencies > Select project that is not building > Add the required dependency > Confirm that the Build Order tab now shows this project higher than the project failing to build

Still did not work. Removed and added the reference again and it then worked.
The change in Source Control for the file was that the version no was in the broken version. not in the fixed version. Before here:

After here:

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: