Search
Thursday, December 13, 2018 ..:: Home ::.. Register  Login
   Calendar  
     
  
   Search  
     
  
   Blogroll  
     
  
   Disclosure  
All blog entries are the opinions of the author and do not necessarily reflect the opinions of their employer. All the code presented is for explanation and demonstration purposes only. Any damages incurred to your site and/or data are not the responsibility of the author. Every effort is taken to ensure the code properly compiles, however sometimes there are some hiccups and you might be required to do your own debugging.
     
  
   TechTidBits (Blog)  

"Object reference not set to an instance of an object" when you try to run a WP7 app?

Apr 12

Written by:
Monday, April 12, 2010 9:06 PM  RssIcon

Error message in VSAre you getting an "Object reference not set to an instance of an object" error message when you F5/start running your WP7 app?  Read on, the solution is MUCH simpler than you think!

Error message in VSSo!  You wrote your first WP7 app?  COOL!  Then you goto sleep, next day you wake up, work, return home, have supper, open up VS, hit F5 and BOOM!!!!!!!!!!  You're staring RIGHT into something that LOOKS like an uncaught exception, but it's not labeled as such, it's not a KNOWN exception, cause well, it's not showing an exception type, nor a stacktrace.  Your app just dies on the table!  DOH!  WTF?

"Object reference not set to an instance of an object"

Turns out, the problem is rather simple (IMHO!).  Check out my steps to repro above, you just opened up VS and hit F5 right?  Chances are, you're solution is the currently selected node in the Solution Explorer tree, right?

Solution node selected

If that's the case, then the solution is as simple as selecting another project and hitting F5 again.  YUP!  It's THAT simple.

Select another project in the solution

I want to thank Rob Miles and Ginny Caughey for the heads up and the fix!  For without their blogs/posts/tweets, I would have torn what little hair I have left, OUT!

Now that you can keep your hair too!  LOL  It's time to grab a coffee and get coding!

 

Resources

robmiles.com: Why do I get an “Object reference not set to an instance of an object” error when I run my program?

Twitter: Ginny Caughey

Tags:
Categories:
Location: Blogs Parent Separator TechTidBits

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment   Cancel 
     
  
Copyright 1999-2012 by PCHenry.com   Terms Of Use  Privacy Statement