After many months of doing other things, one of our devs tried to open our solution in the latest version of Visual Studio 2017 (15.7.3), only to be greeted with the following error message:

Project file is incomplete. Expected imports are missing.

Huh?

After some googling, we found this helpful answer on Stack Overflow:

I had the same issue. In my case, deleting global.json and appsettings solved the problem.

Aha! We’re still on ASP.NET Core 1.1, so we have our SDK pinned at version 1.1.8 in global.json:

{
  "sdk": {
    "version": "1.1.8"
  }
}

When looking at the .NET Core SDKs he had installed, we noticed that he had older versions, but did NOT have 1.1.8. After installing 1.1.8, he successfully loaded the solution without error.

So if you run into this error message, check to see whether you have pinned your solution’s SDK version, and if so, check to see if you have the pinned version installed.