Windows Phone 7 – one fix for “Xap packaging failed. Object reference not set to an instance of an object.”

I faced that error while building a WP7 app after doing some reorganization of files within the solution.

VS2010 didn’t give any pointers, so i turned to Google and found this post in Jayway Team’s blog. My problem was not exactly the same, but that post pointed me to the right direction. Thank you to Jayway Team!

I had accidentally moved the default “ApplicationIcon.png” and “BackGround.png” from the root of the solution to a resources folder. After a bit of digging around the solution, i found the references to those images in the WMAppManifest.xml-file located within properties folder.

Issue went away by altering the paths. Really simple, but why-oh-why VS couldn’t give me any useful information right at the beginning…

10 thoughts on “Windows Phone 7 – one fix for “Xap packaging failed. Object reference not set to an instance of an object.”

  1. I’ll jump on the bandwagon. I’d renamed some files in my source control and created some new background images for my live tile and there were still some files “included in the project” that were no longer there. I was ready to spend the day restoring previous versions and recreating all the changes I’d made in the last 24 hours, but 5 minutes after reading your post, I was back in good working order!

    Thanks!

Leave a reply to Zelleriation Cancel reply