I thought the only way was to reset my PC and reinstall visual studio, but then I thought of resetting visual studio and it helped.
The error is basically due to some errors in importing the files. So I tried to reset the vs settings by simply going over to
tools>import and export settings>reset all setings>general
and hit next.
hope it helped :-)