The problem seems to be with the new lightweight solution loading feature of VS2017.
To fix it, first clean up:
- Close Visual Studio 2017
- Delete or rename the
.vsfolder - Reopen the solution
Afterwards, don’t re-enable lightweight solution loading for that solution.
You can completely disable lightweight solution loading for all solutions in the options, but if the problem only applies to some solutions then that might be a bit heavy handed.