Skip to content

After using Package Refs, retargeting project produces a NuGet Error #6907

Open
@rido-min

Description

using d15.7

Repro Steps

  1. Create Console App Targeting .NET 4.6.1
  2. Add NewtonSoft using PR
  3. Remove NewtonSoft
  4. Retarget to .NET 4.6.2
  5. 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.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions