The Version Option is Invalid – Fix

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:

C:\Users\<username>\AppData\Local\Microsoft\XDE

C:\Users\<username>\AppData\Local\Microsoft\Phone Tools\CoreCon\10.0

C:\Users\<username>\AppData\Local\Microsoft\CoreCon\1.0

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! :D

About these ads

2 Responses to The Version Option is Invalid – Fix

  1. Georgi Atanasov says:

    Hello,

    Thanks a lot for your post and for sharing your experience. I was fighting with this dumb problem about two days and unfortunately your fix didn’t work on my side. Here is what finally solved the issue (just before giving it up and re-installing my entire PC):

    - Follow all the steps described by the above post
    - Re-apply VS 2010 SP1 (I am running VS Ultimate edition)
    - Bingo! The error is gone :)

    • keyboardP says:

      Hi Georgi,

      Glad you got it sorted :). It’s a very random error and it seems to only affect a few people. I’ll update the post suggesting that you may need to reinstall VS 2010 SP1.
      Thanks for letting me know! :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 43 other followers

%d bloggers like this: