Sunday, April 30, 2006

 

Recently I opened a VS2005 Smart Device project that I was assured worked for others, only to face an error message box:
---------------------------
Microsoft Visual Studio
---------------------------
Error retrieving information from user datastore. Platform not found.
---------------------------
OK
---------------------------

When I hit my only choice, which was the OK button, a warning message box appeared:
---------------------------
Microsoft Visual Studio
---------------------------
The project could not be opened because it refers to a device platform that does not exist in your datastore.
---------------------------
OK Cancel
---------------------------

Clicking OK or Cancel had the same effect: the project does not load (i.e. it is "unavailable" in solution explorer).

However, in the top right corner of the warning message box there was the question mark icon. At first I didn't think of clicking on it, since it traditionally is used to get help on UI widgets on the dialog box it appears on. Instead, this one acted as a Help button (why not offer that next to the Cancel button is beyond me) and pointed to this msdn page:

The project you are trying to load targets a device platform that your Visual Studio installation is not configured to support.

To correct this error
Install the platform that supports the project you want to load.

For example if you are trying to load a Windows Mobile 5.0 project and do not have the Windows Mobile 5.0 SDK installed, install the Windows Mobile 5.0 SDK.

So clearly whoever saved that project had saved it while the "Target Device" was set to "Windows Mobile 5.0" (and probably created the project in the first place by choosing the WM 5.0 template). Since the WM 5.0 SDK doesn't ship with VS2005, any machine (like my tablet) that hasn't had the WM 5.0 SDK installed fails to open the project.

As I didn't have time at this instance to download the SDK (or switch to my main machine that has the SDK installed), I opened the csproj file in notepad, located the following line:
<PlatformID>4118C335-430C-497f-BE48-11C3316B135E</PlatformID>
... and changed it to this one:
<PlatformID>3C41C503-53EF-4c2a-8DD4-A8217CAD115E</PlatformID>

Save and close, now reopen in Visual Studio and all is fine (with Target Device set to "Pocket PC 2003").

While it makes no difference, I also changed the OSVersion tag, since it points to 5.01, which is not the WinCE version that PPC2003 is based on: 4.20

Finally note that if you *can* open your project and *then* need to change the platform, you don't have to mess with the text files, simply choose Project->Change Target Platform.

Labels:


Comments:
MOST helpful - thanks!

 
_________________

I had done this ,thanks a lot it working fine,but i have a query if i will try to run the application cab file on windows mobile 5 then will it worked there?

 
_________________

T.Vian: Glad it helped.

Annie: It is always best to use the respective emulators or even better real target devices for actual testing. If you rn into issues, please use the appropriate MSDN online forum.

 
_________________

thanks men,

i work fine with vs2005 and hp pocket iPAQ (windows ce 5) after you tip.

 
_________________

Thanks a lot for placing this here. It helped.

 
_________________

Hi,
I m new to this Blog. So Hi to all.
I have also getting the same problem i.e "Error retrieving information from user datastore. Platform not found". I tried your tips but it doesn't work, I spend 2 days on this prob but didn't get any solution I cannot reinstall VS 2005. Can u help me?

 
_________________

Diego, Manjunath: Glad it helped.

Rajashri: Please post to the forums for support:
http://www.danielmoth.com/Blog/2005/09/before-you-email-me-with-question.html

 
_________________

yes, its works..

 
_________________

Men!! Thanks! You save my head and my time!

 
_________________

Great work dude

 
_________________

Great work mate! i was so worried for this one. absolutely stunning.
Thanks a lot.
Sachin G.

 
_________________

Post a Comment

Please keep comments directly relevant to this blog post. Remember that generic support questions are best posted to the MSDN Forums.

Note that Anonymous comments are likely not going to appear so Sign-in or at least pick a Name even if you don't have a URL.





« Latest Posts

Copyright © Daniel Moth