title: How to resolve .net core build error NETDSDK1061 and warning MSB3277
body: <p>I´ve had the problem, that my AspNetCore.App-metapackage referenced a lower Version of EntityFrameworkCore (2.1.2), than a EfCore provider package (NpgSql, referencing 2.1.3). The result was the warning MSB3277 (<a href="https://stackoverflow.com/questions/52496338/what-to-do-if-msb3277-occurs-in-asp-net-core-app">here is the question</a>). The quickfix for that was the accepted answer.</p>
  
  <p>Another answer pointed out, that I´ve worked with a lower Microsoft.AspNetCore.App package (2.1.1 at that time) than the last stable version (2.1.4). Changing the package Version was not possible (see picture below).</p>
  
  <p><a href="https://i.stack.imgur.com/imHMo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/imHMo.png" alt="enter image description here"></a></p>
  
  <p><strong>I´ve had the same issue with Microsoft.NETCore.App in a class library-project</strong></p>
  
  <p>I even didn´t noticed that I used an older metapackage than available. Until today I always checked, if any Updates are available in NuGet Package Manager. I´ve worked with the default project templates and always installed the latest .NetCore SDKs, believing that this is enough. It wasn´t.</p>
  
  <p>After investigating this issue, I´ve found out, that I can force my project to use a specific .NETCore.App or AspNetCore.App metapackage with package manager console (<code>Install-Package Microsoft.NETCore.App -Version 2.1.4</code> or <code>Install-Package Microsoft.AspNetCore.App -Version 2.1.4</code>).</p>
  
  <p>After that command I´ve had a build error (<code>NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.4, but with current settings, version 2.1.0 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish.</code>).  </p>