Search code examples
visual-studiosilverlightwindows-phone-7windows-phone-7.1xap

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


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?


Solution

  • 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!