Does PB 5.0 work side-by-side with PB 6.0?

Hey, PB expert guy, I have a question.

Shoot.

Can I run PB 5.0 side-by-side with PB 6.0?

Short answer or long answer?

Um, short answer, please.

Kind-of.

What kind of answer is that? This is a yes-or-no question!

Ok. Then the answer is no.

That’s not what I wanted to hear.

Oh, sorry. The customer is always right, I forgot. Yes, yes, of course you can.

Are you lying to me?

Technically, no.

I want the truth.

You can’t handle the truth.

Ha ha. Very funny.

Well, you can run them side by side, but you may or may not be happy with the results.

Hmm. You’re weaseling out of the question, aren’t you?

Yup. Weaseling is what separates us from the animals. (Except the weasel.)

Ok, then the long answer please?

Sure. But first, recognize that the following information is offered without any warrantee or guarantee. You follow these instructions at your own risk. Neither Microsoft nor dcook accepts any responsibility for the use or misuse of these instructions. Use at your own risk. Back up your data first. I’m sharing this information because it has helped others, but it may or may not help you.

Yes, I accept. (click.)

Platform Builder 5.0 and 6.0 tools do not always work perfectly when both are installed on the same computer. (Note that this refers to the PB IDE and tools, not to the OS build tree. The build tree is fairly self-contained.) Most things work, but there are a few challenges. There are also a few steps you can take to minimize the challenges.

The first thing to know is that you must install PB 5.0 first. If you’ve already installed PB 6.0, I’m sorry, but you'll have to uninstall it. PB 5.0 broke some installation rules and will clobber some PB 6.0 settings. And there are a few things that PB 6.0 had to do that aren’t pretty, so a repair of PB 6.0 might not work either. If you’ve already installed PB 6.0 and want to install PB 5.0, your best bet is to uninstall PB 6.0 first. Here is the recommended order of installation:

  1. Install PB 5.0.
  2. Make a backup copy of all files in C:\Program Files\Common Files\Microsoft Shared\Windows CE Tools\Platman\bin. (Only the files in the bin folder need to be backed up. The subfolders do not need to be saved.)
  3. Install Visual Studio 2005 and all associated service packs (as of this writing, SP1, and if you’re running Vista, the SP1-Vista-GDR).
  4. Install PB 6.0 and all associated service packs (as of this writing, SP1).
  5. Compare the current set of files in the Platman\bin folder with the set of files you backed up. Restore any missing files. (Do NOT overwrite any existing files.)
  6. If you have any Connection Manager device settings that were created with PB 5.0, you’ll need to delete them and recreate them.

At this point, PB 5.0 and PB 6.0 should both be mostly working – or at least as well as can be expected.

What’s that supposed to mean?

Well, the above steps worked for me. But there are all kinds of things that could go wrong, and I may not have tested some aspect of PB that is important to you, so this may not work perfectly for everybody.

The largest trouble spots are with the x86 Emulator, the Remote Tools (especially PerfMon and CeCap), and with CoreCon (download and KITL transports).

Why is this such a problem in the first place? Why don’t you just fix this mess?

I would love nothing better than to fix this mess. Unfortunately, as long as we support cemgr.exe, we’re going to have some side-by-side troubles with the Platman\bin folder. Back in PB 4.0, when the best practices for MSI development were not nearly as well-known as they are today (and they still aren't very well-known), a few mistakes were made in the development of the PB 4.0 Platman install. The result is that if a file was part of the PB 4.0 Platman install in the Platman\bin folder, and we want that file to still exist after PB 6.0 is installed, we have to include that file in PB 6.0. Due to various security and legal issues, there are a few files that were part of PB 4.0 that we can no longer ship in PB 6.0. As a result, installing PB 6.0 causes these files to mysteriously disappear.

Any other issues?

Yeah. If you uninstall either PB 5.0 or PB 6.0, you’ll probably have to repair the remaining version of PB before it runs correctly (Add/Remove Programs, select PB, then select Repair). Certain registry settings for COM interfaces can't really be properly shared between versions of PB.

Also, the CoreCon datastore is a bit more fragile than I would have liked. Sometimes things go wrong with the datastore resulting in problems when you launch Connection Settings from PB or when you try to create a Visual Studio for Devices project. (You may also run into problems while installing PB 6.0 if your datastore is corrupt.) If you have trouble with the CoreCon datastore, try the following:

  1. 1. You can safely delete your local (per-user) CoreCon datastore settings. (See https://msdn2.microsoft.com/en-us/library/ms184403(VS.80).aspx for details.) This sometimes fixes issues with launching Connection Settings or with creating VSD projects. Go to your user’s application data directory, navigate to the Microsoft folder, and delete the CoreCon directory. For example, 'rd /s "C:\Documents and Settings\YourUserName\Local Settings\Application Data\Microsoft\CoreCon" '. (Warning: DO NOT delete the CoreCon settings under All Users!) The next time you activate CoreCon, it will rebuild your per-user datastore. You will lose any devices that you may have configured, but it shouldn't be too hard to recreate them.
  2. 2. If the above does not help, you may have a problem with your global (all users) CoreCon datastore settings. This is a hard problem to solve. These files are in the All Users application data area (i.e. C:\Documents and Settings\All Users\Application Data\Microsoft\CoreCon\1.0, or C:\ProgramData\Microsoft\CoreCon\1.0 on Vista). You can’t just delete these files and hope they come back (because they won’t). This might work:
    1. Make a backup copy of the data in the CoreCon\1.0 folder.
    2. No, seriously. Make a backup copy. If you lose the data in this folder, it may be quite difficult to get it back.
    3. Rename the 1.0 folder to something else, like “1.0_original”.
    4. If a friend or co-worker has a working installation with a similar set of programs (i.e. they successfully installed PB 5.0, VS 2005, and PB 6.0), try copying the data from the other computer to your computer. Ensure that you’ve deleted the per-user CoreCon data (step 1 above), then launch PB 5.0 or VS 2005 and try to open Connection Settings.
    5. If this doesn’t work, rename this folder out of the way (i.e. rename it to 1.0_from_other_computer), then try a repair install of PB 5.0, then VS 2005, then PB 6.0.

Yikes!

Yeah. Tell me about it.

Some people have had better luck just installing PB 5.0 and 6.0 on separate machines, dual-booting, or even installing PB 5.0 into a Virtual PC image.

There are also ways to make PB 6.0 work with OS trees from CE 5.0, but that is a more complicated subject (and while it generally works, it is definitely unsupported by Microsoft).