Tri Nguyen Dung
Tri Nguyen Dung

Reputation: 959

Why all of my .Net project's references are gone?

I have created a web application project. While developing my application, I have installed some packages from NuGet and yet they still there in my project. But when I copy my project to another computer and try to run the project, there are many errors occurred because all references are marked with yellow alerts.

I open the project with file .sln This is the project root folder

When I run the project, it generated a lot of error because it cannot find the libraries. enter image description here

As Abhay Saraf's request, I provide the link to download .csproj section: http://www.hellomeo.net/Umbraco/EmployeeLeaveManagement.zip

Upvotes: 0

Views: 182

Answers (3)

Andre Lombaard
Andre Lombaard

Reputation: 7105

Run dnu restore from the Package Manager Console

enter image description here

Upvotes: 0

Weiwei
Weiwei

Reputation: 3766

First, you need to check the packages.config file in your project to confirm all packages are listed in this file. Then please check your Visual Studio settings (Tools -> Options -> NuGet Package Manager -> General), the options under Package Restore are all checked as below screenshot. enter image description here

If above options are checked but the packages still not restore automatically, please use following ways to restore packages for entire solution.

  1. Open Package Manager Console window from View -> Other Windows -> Package Manager Console.
  2. Type command “Update-Package -reinstall” to reinstall all packages in your current solution which will based on the packages that listed in the packages.config file.

Upvotes: 1

DWright
DWright

Reputation: 9500

Right-click on one of the missing references, choose Properties and see what the Path is set to. Is the Path correct?

Upvotes: 0

Related Questions