The Version Option is Invalid – Fix
July 2, 2011 2 Comments
Whilst most developers were enjoying the Mango SDK and device update, I kept running into a strange problem where app deployment always failed. The error message “The version option is invalid” was always being thrown so I could never test any projects (7.0 or 7.1). Unfortunately, I was also in the middle of updating and creating various apps for 7.0, so I didn’t have time to look in to the problem in any great detail. I tried uninstalling every version of VS2010 and Blend I had on my computer and installing the Mango Beta 1 and 2 from scratch. This didn’t make a difference as the error kept appearing. However, before starting a new project, I decided to take a deeper look into the problem and managed to fix it. So, for anyone who comes across this problem, this information might be helpful:
These are the steps I took to solve the issue. Not all steps may be required, so if anyone managed to solve it in fewer steps, let me know. ( I have a feeling the VHD/decfg files were the root cause of the problem, but I’ve included the CoreCon directories as well. If it’s just a case of the VHD/decfg files, you can first try step 3 with regards to the XDE folder).
1) Uninstall the Mango Beta SDK
2) Open up these three folders:
Hopefully you’ll see a bunch of files in each folder. The CoreCon folders will have XSLT Stylesheets and the XDE folder will have VHD and decfg files.
3) As a backup, cut these files and move them to another location (so you can retrieve them if you need to). However, you can leave the Notifications folders alone.
4) Besides the Notifcations folders in the CoreCon directories, all three of the above directories should be empty.
5) Reinstall the Mango Beta SDK
6) Deployment should now work (you may need to run VS as administrator).
Update – As suggested by Georgi Atanasov in the comments, if deployment still doesn’t work after following the steps above, try reinstalling VS 2010 SP1.
As a side note, I’m now running this with Visual Studio 2010 Ultimate + SP1, so it should work smoothly with that.
Let me know if this helps, or you’ve found something new. Finally, it’s time for some Mango! 😀