Nuget Packages are there but missing References

Shiloh :

After branching in TFS, VS2015 Update 2 has missing references to all Nuget packages. Package restore says "All packages listed in packages.config are already installed."

I could manually add references to all of the packages in the \packages folder but why isn't VS already checking there?

Leo Liu-MSFT :

You need use the NuGet command line in the Package Manager Console:

Update-Package -reinstall

to force reinstall the package references into project.

NuGet Restore only restores files in the packages directory (\packages folder ), but does not restore files inside your project or otherwise modify your project. For example, if a package has added some reference DLLs or other files in your project, if you delete any of these files, they will not be re-added when restoring this package. This may cause the your project to not be able to find the missing dependencies when building.

So use the "Update-Package -reinstall" command to force reinstall the package references and content files into project.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

.Net 2015 References with yellow triangle for Nuget packages on portable libraries

NuGet Packages are missing

Restoring Nuget References?

All system references missing Visual Studio 2013 NuGet Async

How to upgrade nuget packages if the installed version is missing?

How can I fix missing nuget references after moving project in Visual Studio 2015

NuGet not updating project references

Some NuGet packages are missing from the solution in Visual Studio Application

Manage NUGET Packages menu missing after update

After clone of web site project nuget restores packages but references are not found VS 2015

NuGet restoring packages but missing DLLs

Manage NuGet Packages dialog missing VS2017

Broken Nuget Packages References out of the box

Visual Studio: how to add nuget packages as references when doing "Restore NuGet packages"

Two Nuget Packages references conflicting reactive libraries

Missing NuGet packages when used on project within a solution

VS Unit Test Project missing NuGet packages

NuGet Install - Package 'EntityFramework.6.2.0' already exists in folder - csproj references another projects packages folder

.Net Core Nuget Package Version mismatch: Two packages have references to different versions of the same dll

NuGet Packages, Active Development and References

Resolve project assembly references from nuget packages?

How do I disable relative URL references to Nuget Packages in Visual Studio?

Nuget references not found

SignalR references NuGet package(s) that are missing

How to install all missing Assemblies and Nuget packages with dependency in one go - Visual Studio 2017?

The project references NuGet packages that are not on this computer

Resolving nuget package references

Force compiler to use references from installed NuGet packages only instead of local DDLs

Xamarin Forms: This project references NuGet package(s) that are missing on this computer

TOP Ranking

HotTag

Archive