Xap packaging failed. Object reference not set to an instance of an object

Subby picture Subby · Jan 29, 2012 · Viewed 23.3k times · Source

I'm getting this error message on my PC when I try to build my Windows Phone app:

Xap packaging failed. Object reference not set to an instance of an object

I'm using Dropbox. On my laptop, It works perfectly fine and I can debug etc...On my PC however, I can't.

I tried many things such as:

  • Delete obj/Debug Folder
  • Check for files which are missing on the Solution Explorer

So far, nothing has helped.

Any idea how I can fix this?

Answer

MAXE picture MAXE · Sep 20, 2012

You should check, in every folder of your project, for missing files or wrong references.

You can get this problem just with a single missing image, if its Build Action property is set to Content or similar...

enter image description here

Check your files and then Rebuild your project!