

NuGet shows a build error in such cases immediately after project retargeting, and subsequent build warnings let you know that the package may need to be reinstalled.

For a single package, delete the package folder and use nuget install to reinstall the same one.įor the dotnet CLI, the equivalent procedure is not required.

Switch to the Browse tab, search for the package name, select it, then select Install).įor all packages, delete the package folder, then run nuget install. On the Installed tab, select a package, record its name, then select Uninstall. On the Updates tab, select one or more packages and select Update Package Manager console (described in Using Update-Package) Updating and reinstalling packages is accomplished as follows: Method In Visual Studio, the Package Manager Console provides many flexible options for updating and reinstalling packages. Updating a package simply means installing an updated version, which often restores a package to working order.

In these cases, uninstalling and then reinstalling the same version of the package will restore those references to working order. There are a number of situations, described below under When to Reinstall a Package, where references to a package might get broken within a Visual Studio project. PackageReference projects automatically fix broken references when restore is run. The following section applies to nfig based projects only.
