TFS Build: Could not resolve this reference. Could not locate the assembly ”. Check to make sure the assembly exists on disk.
21-Feb-1212 Leave a comment
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: