title: Build error while transitioning between branches: Your project is not referencing the ".NETFramework,Version=v4.7.2" framework
body: <p>We're using Git and we have a solution which is targeting the full net framework. A couple of days ago, I've started migrating the solution to .net core. Unfortunately, something comes up which made me go back to the master branch (which has the code for the full .NET framework). Whenever I try to build the app, I get the following error:</p>
  
  <blockquote>
    <p>1>D:\Program Files (x86)\Microsoft Visual
    Studio\2017\Community\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5):
    error : Your project is not referencing the
    ".NETFramework,Version=v4.7.2" framework. Add a reference to
    ".NETFramework,Version=v4.7.2" in the "frameworks" section of your
    project.json, and then re-run NuGet restore.</p>
  </blockquote>
  
  <p>I've tried cleaning up the nuget packages, running a git reset, but nothing seems to help. Any idea on what's going on?</p>