This error came up in our server ,by which I was not able to open the ascx or aspx files in visual studio 2012.This error caused the intellisense to not work in design pages, also the Tools box was not showing up with any controls only the HTML controls was available.
Analysing the Log I found that there was the below exception
System.NullReferenceException:Object referencenot set to instance of an object.at Microsoft.VisualStudio.Web.Exports.HTMLClassifierProvider.Microsoft.VisualStudio.Text.Classification.
IClassificationProvider.GetClassifier(ITextBuffer textBuffer) at Microsoft.VisualStudio.Text.Classification.Implemention.ClassifierTaggerProvider
Logs can be found at "C:\User\UserName\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml"
You can try below steps to resolve this issue
- Open visual studio click Tools then Import and Export setting reset all.This will reset all your custom changes
- Choose Tool -->Tools Box item run it once
- Tools-->Extension and updates-->If you have installed any vulnarebale packages uninstall them
- Run the Visual Studio Repair
- Uninstall and Install the VS 2012 again
- In my case none of the above worked
I guess some of the system update corrupted the framework hence the issue was caused.VS2012 installer also installs the framework but since it was already installed, it dint try to install again I believe. Downloading a new package of .net FrameWork 4.5 and installing it solved my issue with Visual Studio 2012