Device platform not found

Sun, April 30, 2006, 09:35 AM under MobileAndEmbedded
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.
Tuesday, 17 June 2008 10:32:00 (Pacific Daylight Time, UTC-07:00)
MOST helpful - thanks!
T.Vian (newbie)
Wednesday, 20 August 2008 06:35:00 (Pacific Daylight Time, UTC-07:00)
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?
annie
Thursday, 28 August 2008 23:27:00 (Pacific Daylight Time, UTC-07:00)
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.
Monday, 13 October 2008 15:46:00 (Pacific Daylight Time, UTC-07:00)
thanks men,

i work fine with vs2005 and hp pocket iPAQ (windows ce 5) after you tip.
Saturday, 08 November 2008 23:40:00 (Pacific Standard Time, UTC-08:00)
Thanks a lot for placing this here. It helped.
Sunday, 23 November 2008 23:11:00 (Pacific Standard Time, UTC-08:00)
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?
Monday, 24 November 2008 00:46:29 (Pacific Standard Time, UTC-08:00)
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
Tuesday, 07 April 2009 05:49:00 (Pacific Daylight Time, UTC-07:00)
yes, its works..
Anonymous
Saturday, 28 November 2009 10:54:52 (Pacific Standard Time, UTC-08:00)
Men!! Thanks! You save my head and my time!
Tuesday, 15 December 2009 22:06:56 (Pacific Standard Time, UTC-08:00)
Great work dude
Anonymous
Friday, 15 January 2010 02:43:33 (Pacific Standard Time, UTC-08:00)
Great work mate! i was so worried for this one. absolutely stunning.
Thanks a lot.
Sachin G.
Anonymous
Comments are closed.