Visual Studio 2015 error “Object reference not set to an instance of an object”

This fixed my razor intellisense problem and the error after installing the latest ASP.NET tools.

Here is how to fix it.

Delete the contents from the following folders:
C:\Users{user}\AppData\Local\Microsoft\VisualStudio
C:\Users{user}\AppData\Local\Microsoft\VSCommon

Navigate to the command line now and run devenv from either of these paths:
[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE

run devenv /resetuserdata from the command prompt.

Thanks to fka for the steps!

https://stackoverflow.com/questions/34084003/visual-studio-2015-error-object-reference-not-set-to-an-instance-of-an-object/34085345#34085345

Happy Coding!

Reset performance counters when getting errors in Perfmon or Load Center

Old thing I was working on over a year ago. Well, maybe it is useful to someone:

 

PS C:\Windows\system32> cmd
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\Windows\system32>lodctr /R

Error: Unable to rebuild performance counter setting from system backup store, error code is 2
C:\Windows\system32>cd ..

C:\Windows>cd syswow64

C:\Windows\SysWOW64>lodctr /R

Info: Successfully rebuilt performance counter setting from system backup store
C:\Windows\SysWOW64>winmgmt.exe /RESYNCPERF

C:\Windows\SysWOW64>

Value was either too large or too small for a UInt32. TFS Error

I got this error in Visual Studio 2015 checking in to TFS.
“Value was either too large or too small for a UInt32.”

WTF? Turns out it is because I had an open sql query file that wasn’t saved and it get angry.

Really stupid error that should read :” You have an saved file, please save all files before checking in”

Wow. That would have taken the developer a small minute. Oh yeah, this is probably an unhandled exception, caught higher up and presented to us as an amazing insight into what was wrong.

Anyway, Save All before checking in and you will be fine.

Happy Coding!