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: 1
Try the following:
- Have Visual Studio closed
- Download all your files to your computer
- Delete Bin and obj folders completely.
- Open the .sln
- Rebuild
If if fails expand the References in te Solution explorer and make sure all your dll's are found. If a dll have a yellow exclamation point that means its not found. I'm thinking that one of your references are set to an absolute path on your laptop and that's missing on your PC.
by : MyKuLLSKIhttp://stackoverflow.com/users/1139769Answer: 2
The problem lies in your startup object in your Application. I have met this error to many times.
It usually happens when I change the name of my class/namespace Application class. Or it might even be conflicting with your dropbox locations.
To Fix this.
- Right click your main project or Alt+Enter
- Go to the silverlight tab and set your startup object
Answer: 3
This can happen if a file is removed from the disk itself, but not from the Solution through Visual Studio. Delete the file through Visual Studio (it should be marked with a little yellow hazard icon) and Rebuild.
Credit to Andreas Hammar via http://blog.jayway.com/2011/06/03/wp7-build-error-xap-packaging-failed/ - his solution worked for me.
by : Ryan Shripathttp://stackoverflow.com/users/1943Answer: 4
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...
Check your files and then Rebuild your project!
by : MAXEhttp://stackoverflow.com/users/833644
No comments:
Post a Comment
Send us your comment related to the topic mentioned on the blog