title: How can I debug "Object reference not set to an instance of an object" in VS2013?
body: <p>I have a c# Azure project that is just a web api, and wanted to remove some of the non-API default components (welcome page, help, etc). After doing so, when launching the application, I get an error message "Object reference not set to an instance of an object."  I've seen this before when doing things in Azure, and somehow got around them each time. My question really is: how can I debug this error on my own? This error description is woefully lacking in detail (there's no call stack or anything, as if the app hasn't yet launched, and the dialog is modal so I can't click on anything within VS)</p>
  
  <p>Extra notes: </p>
  
  <ul>
  <li>it's an ASP .NET project.</li>
  <li>it works once I publish to Azure. </li>
  <li>after copying the project entirely and rebuilding, it seemed to work. then when mucking with NuGet dependencies, we're back to it not working (i've tried deleting my packages folder and having NuGet recreate - no luck; no idea if related to NuGet at all)</li>
  <li>I re-copied the project, so just 'MySolutionFolder' -> 'MySolutionFolder - Copy', reopened with same version of VS, runs fine. This is an amazingly sloppy solution obviously, so looking for something better.</li>
  </ul>
  
  <p>As described in a comment, the issue presumably dealt with access rights to various files, most likely NuGet related but possibly Azure as well, which explains why copying to a new solution directory 'fixed' the issue. I would love to see better error info, such as "Error: Visual Studio couldn't write to 'packages.config'", so I know actually <em>where</em> to fix this sort of issue. As it stands now, it's like a compilation error that says <em>"Syntax error in code. Somewhere. Good luck finding it"</em>.</p>