VS 2015 Error “Object reference not set to an instance of an object” when creating a new project or opening a project?

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.

visual-studio-2015
asked on Stack Overflow Oct 18, 2015 by ElegantOfKing • edited Jul 10, 2017 by James Z

6 Answers

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.

answered on Stack Overflow Oct 18, 2015 by Igal Tabachnik
1

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)

answered on Stack Overflow Jun 3, 2016 by George M • edited May 23, 2017 by Community
1

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

answered on Stack Overflow Aug 10, 2017 by JohnLBevan
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.

answered on Stack Overflow Oct 7, 2016 by Orion390
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...

answered on Stack Overflow Jul 10, 2017 by bcol
0

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

answered on Stack Overflow Jan 6, 2021 by jelde015

User contributions licensed under CC BY-SA 3.0