Visual C# Developer Center > Visual C# Forums > Visual C# IDE > VS 2010 Beta 2: How to fix "Object reference not set to an instance of an object" when trying to build
Ask a questionAsk a question
 

StickyVS 2010 Beta 2: How to fix "Object reference not set to an instance of an object" when trying to build

  • Wednesday, November 04, 2009 7:17 PMWeston Hutchins - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    We've seen several reports from customers who, when attempting to build, are presented with the error message "Object reference not set to an instance of an object."  This is most likely due to a Beta 2 bug where undocking and redocking tool windows sometimes causes them to disappear.  For this particular case, if the Output window is the tool window that cannot be displayed, you'll get this error when trying to build certain project types.

    To fix this error:

    1. Open up a Windows Run Prompt (Windows Key + R)
    2. Type "devenv /resetuserdata"

    NOTE: This will reset your settings so if you want to persist your current settings file, make sure you create a backup in Tools->Import and Export Settings...

    Thanks,
    Weston Hutchins
    Program Manager - Visual Studio Shell Team
    Remember to mark the best replies as answers!