After using Package Refs, retargeting project produces a NuGet Error #6907
Open
Description
using d15.7
Repro Steps
- Create Console App Targeting .NET 4.6.1
- Add NewtonSoft using PR
- Remove NewtonSoft
- Retarget to .NET 4.6.2
- Build
Expected. Build succeeds.
Observed. Build fails with
Microsoft.NuGet.targets(186,5): error : Your project is not referencing the ".NETFramework,Version=v4.6.2" framework.
Add a reference to ".NETFramework,Version=v4.6.2"
in the "frameworks" section of your project.json, and then re-run NuGet restore.
weird error message since the project is not using any packages, and project.json was never used.