Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 31 Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 37 Blog by Joel Fjordén a.k.a. Will o Wisp
SavePictureToCameraRoll throws InvalidOperationException in Windows Phone 7.1 (Mango) 
Wednesday, July 13, 2011, 06:09 AM - Windows Phone 7
I recently upgraded my Windows Phone 7.0 project to 7.1 (Mango), by simply changing the Target Windows Phone Version setting in project properties.

After that I wanted to utilize the SavePictureToCameraRoll feature, but this call always throw an InvalidOperationException simply stating, "An unexpected error has occured.".

Trying the same thing in a new project worked like a charm, so after some digging and file comparisons I found that the WMAppManifest.xml file is not "upgraded" when changing the target version to 7.1, and in order to be able to call this method the ID_CAP_ISV_CAMERA capability must be added.

I hope this can save someone else's time!
2 comments ( 129 views )   |  related link