Ah yes the dreaded error #4001. I ran into this problem and every solution Google presented to me did not work. So what’s the situation: I have some images in my Silverlight project with Build Action set to Content. As a result the image is put into the .xap. With my development background I put these images in subfolders in the project as can be seen in the image. The image source property is set to /80 – Resources/10 – Images/ContentImage.png. And this situation resulted in the error.
It turns out that Silverlight breaks because there are spaces in the folder names (the spaces around the dash). When I remove these spaces (in the project folder structure), the error is gone! NB when hosting the image on the webserver (with your .xap for example) spaces in folder names are no problem at all.