Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run solution from TFS as all references are missing

I have a project which works fine. This morning, I created a new TFS project and published all the code from Visual Studio 2015.

On another computer, also via VS2015, I've logged into Visual Studio Team Services to grab the same project and downloaded all the code

When I try to build, there are over 100 errors, but the cause appears to be the same. It can't find resources, and the error messages all appear to be

The type of namespace name 'some name' does not exist in '....' (are you missing an assembly reference?)

So, I expand the References and I'm missing pretty much all of them. In fact, other than the references within my own project, the rest are not there

Looking at the properties shows no path. Back on the original PC I see the path to any of the .dlls is similar too

C:\Users\Me\Documents\Visual Studio 2015\Projects\MyProj\ToT\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll

Is the issue that since this path doesn't match on the 'faulty' machine it can't show... Therefore what is the solution to this

enter image description here

I checked and noted that the files do appear to exist when I look at them in File Explorer.

All system references missing Visual Studio 2013 NuGet Async did not help

Please note, this happens with all projects in my solution, but not consitently. For example, EntityFramework is missing from all, but System is missing from my UI layer, but not from my BLL layer

Is there a way to fix this?

like image 694
MyDaftQuestions Avatar asked Nov 02 '15 19:11

MyDaftQuestions


2 Answers

You need to run the update-package -reinstall command to reinstall all referenced packages.

like image 154
Vicky - MSFT Avatar answered Oct 05 '22 10:10

Vicky - MSFT


Go to TOOLS -> nuget package manager -> package manager console -> and run to the console : UPDATE-PACKAGE -REINSTALL . Clean your solution, rebuild and you are ready!

like image 30
Give IT Avatar answered Oct 05 '22 11:10

Give IT