Nuget re-targeting after upgrading from .Net Framework 4.5 to 4.6.1 [duplicate]

The packages will not be retargeted automatically, but there is an automated fix for this.

In Package Manager Console simply run:

Update-Package -Reinstall

This will force the package manager to reinstall every package in every project (without changing the version of the referenced package).

By reinstalling the packages after the new framework is targeted this changes all the references to the correct version.

You may also run this against a single project with :

Update-Package -Reinstall -ProjectName Project.Name.Here

I have used this technique many times to fix nuget reference issues.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)