When i try to access my solution Properties, i get the following error:
Object reference not set to an instance of an object
I am using VS 2012. What could be the cause of this?
When i try to access my solution Properties, i get the following error:
Object reference not set to an instance of an object
I am using VS 2012. What could be the cause of this?
Some extensions may cause this. Try disabling extensions and restarting Visual Studio.
Quite often error will be gone even if you re-enable extensions after this.
There's a bug report on Microsoft Connect (link). It is marked there as "Closed as External", but it seems that it may occur randomly with any extension, so would be worth voting it there to bring it to Microsofts attention.
In my case, the problem was solution-specific. NuGet was causing this error, but not the extension itself but a NuGet package that generated an error on VS load. When I opened NuGet Package Manager Console I saw a big red text with a description of the error. In my case it was T4Scaffolding.Core package, which in turn is a dependency of MVCMailer.
If this is your case, you will probably see what package generates an error in PM Console.
I faced this dialog too and i'm not sure what exactly causes this as i couldn't even open the NuGet console to see detailed error messages.
Closing Visual Studio, deleting %AppData%\Microsoft\VisualStudio
and restarting Visual Studio worked for me as it causes a reset of various things like window configurations.
I think if this dialog is displayed some files may be corrupt in %AppData%\Microsoft\VisualStudio
and by deleting that folder Visual Studio can start normally again.
Update:
The issue arises on my machine when i start Visual Studio by using "run as administator" whereas Visual Studio has been started before without that option and %AppData%\Microsoft\VisualStudio
had been created without the administator association.
Visual Studio 2013: I had this issue when I tried opening TOOLS -> Extensions and Updates. I used @ViRuSTriNiTy idea, but only cleaned the files from: C:\Users[myUserName]\AppData\Local\Microsoft\VisualStudio\12.0\Extensions There are 2 cache files over there. Deleted them and restarted VS2013 and it was fixed
The way it was happening for me might be unique to me/my setup, but I'd love to know if anyone else has this happen, and if they find out why:
I'm going to just always launch the .sln file from now on, but I'd love to know why this happens when using "Open Project" from the welcome page or from File > Open > Project/Solution! I tried going into Tools > NuGet Package Manager > General and I unchecked the options for allowing NuGet to download missing packages and Skip applying binding redirects, and under Package Sources I de-selected the checkboxes (my dev machine does not connect to the internet). Environment > Extensions and Updates: I tried it with and without "Load per user extensions when running as administrator" and running it as an Admin and without running as Admin. Also tried just deleting everything at C:\Users\me\AppData\Local\Microsoft\VisualStudio. No change from those 2 bullets above.