4

Environment:WIN 10 Pro IDE:Visual Studio 2015 Community

When I tried to create a project or open projects,the VS would warn that"Object reference not set to an instance of an object".Andreading the System Log,I found this recording:

Faulting application name: devenv.exe, version: 14.0.23107.0, timestamp: 
0x559b7ead

Faulting Module Name: unknown, Version: 0.0.0.0, time stamp: 0x00000000

Exception code: 0x80131623

Error offset: 0x161c5b8e

Error Process ID: 0x159c

Faulting application start time: 0x01d109944863532a

Faulting application path: D: \ CODESOFT \ Common7 \ IDE \ devenv.exe

Error module path: unknown

Report ID: 71d54c89-2d77-4994-9fac-0d30bd06b3d8

Error package Full name:

Error package relative to the application ID:

Although I spent many times searching in Google or any other websites and trying different ways to solve this question,but now the question is still exists.

James Z
  • 12,209
  • 10
  • 24
  • 44
ElegantOfKing
  • 91
  • 1
  • 1
  • 8
  • [This solution resolved my problem](http://stackoverflow.com/questions/34084003/visual-studio-2015-error-object-reference-not-set-to-an-instance-of-an-object) – Hiren Kagrana Nov 14 '16 at 07:19

6 Answers6

6

There could be several reasons for this: corrupted install, faulting extension and so on.

Your error message doesn't necessary help, since it doesn't contain any useful diagnostic information, however it suggests your Visual Studio isn't installed in the "default" location (e.g. Program Files (x86)). It may be that it wasn't installed correctly, or otherwise has corrupt settings.

To try and repair it, I suggest you do the following:

  1. Open the "Develop Command Prompt" in elevated mode (a shortcut should be installed with Visual Studio). If you don't have it in the start menu, open cmd.exe as administrator, and go to where your devenv.exe file is located (in your case, it looks to be D:\CODESOFT\Common7\IDE\)
  2. Run the command devenv /setup, and wait.
  3. Once it's done, try running your Visual Studio again.

If you still have an issue after this, I suggest running a repair installation of Visual Studio.

Igal Tabachnik
  • 31,174
  • 15
  • 92
  • 157
  • Thanks for answering!but after using all ways you provided,this question still exists.Next I have no choice but to Reinstall the system.Anyway I still thanks your help! – ElegantOfKing Oct 19 '15 at 07:28
2

I know this is a bit late, but hopefully it will help someone along the way. You may try resetting your Visual Studio environment. This worked for me.

Run the command devenv /resetuserdata

Thanks to Fka for the answer. Visual Studio 2015 error "Object reference not set to an instance of an object" after install of ASP.NET and Web Tools 2015 (RC1 Update 1)

Community
  • 1
  • 1
George M
  • 63
  • 2
  • 5
1

Answer copied from https://stackoverflow.com/a/37688026/361842

JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
0

You should check the templates you have installed too, in my case it was the Ionic Templates (which i guess have a bug or something), after making a proyect using ionic template for apache cordova it didn't let me create another proyect, showing the "object reference..." error.

What i did was uninstall the ionic templates and install them again, but the issue persists, having to uninstall and install ionic templates every time i try to create a proyect. Hope it's helpful for someone.

Orion390
  • 127
  • 1
  • 8
0

My situation is that every time when i restart Windows, I can't create new project. I'v tried to uninstall several extensions, it worked awhile, but it still cracked after restarting.

The Clear MEF Component Cache doesn't work for me, although I find that it helps.

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

https://stackoverflow.com/a/34085345/8282574`

So I use a more simple solution and it works.

fixVS.bat

rd/s/q %LOCALAPPDATA%\Microsoft\VisualStudio
rd/s/q %LOCALAPPDATA%\Microsoft\VSCommon

The problem is that each time when I want to create a new project, perhaps I still need to run it again and again...

bcol
  • 1
  • 2
0

Tried a lot of different things when I had this issue. Only fix for me was updating Visual Studio from Visual Studio Installer.

jelde015
  • 554
  • 6
  • 7