Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017: "Object reference not set to an instance of an object" while loading the project

I have a project inside the VS solution that loads correctly in VS2015, but it seems to be corrupted in VS2017 (RC2).

In the solution explorer it shows that its "load failed" and when I try to reload it I receive an error popup with the message "Object reference not set to an instance of an object".

enter image description here

I thought that it might be because VS2017 changed somehow .csproj file automatically for their needs, but after compare it with the version within VS2015 solution I found out that they are not different.

Have anyone experienced something like that? And how it's possibly can be fixed?

Thanks.

like image 390
Artyom Pranovich Avatar asked Jan 20 '17 08:01

Artyom Pranovich


2 Answers

For me on Visual Studio 2017, none of the suggestions worked. What worked was shutting down all Visual Studio instances and wiping away the .vs folder in the solution root.

like image 151
Mahmoud Al-Qudsi Avatar answered Oct 29 '22 16:10

Mahmoud Al-Qudsi


My symptoms were that all the class libraries in my solution were loading correctly but the MVC project was failing to load with the error message in the question.

Running Visual Studio as administrator fixed the problem for me.

like image 31
dannygb Avatar answered Oct 29 '22 17:10

dannygb