I solved this problem by clearing Visual Studio Component Model Cache.
Just delete or rename this folder:
%LocalAppData%MicrosoftVisualStudio11.0ComponentModelCache
or
%LocalAppData%MicrosoftVPDExpress11.0ComponentModelCache
and restart Visual Studio.
The version of Visual Studio you have is specified by the number e.g.
Visual Studio 2012 is 11.0
(as shown above)
Visual Studio 2013 is 12.0
Visual Studio 2015 is 14.0
Visual Studio 2017 is 15.0
Visual Studio 2019 is 16.0
For those that don't know:
%LocalAppData%
is the same as C:Users{yourUsername}AppDataLocal
For those who have multiple versions of Visual Studio installed, e.g. 2012 and 2013, it might help to remove the ComponentModelCache for both versions before restarting Visual Studio, e.g. 11.0 and 12.0.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…